Unix Timestamp Converter

Convert between Unix timestamps and human-readable date/time strings. Supports various formats and live time display.

Formatting Options

Converter

About the Unix Timestamp Converter

This tool converts Unix timestamps (also known as Epoch time) to human-readable date/time strings and vice-versa. A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC). The tool supports various predefined formats and allows for custom date-fns format strings.

Why Use This Unix Timestamp Converter?

Developers frequently encounter Unix timestamps in logs, APIs, databases, and various system interactions. This converter helps to: quickly understand a timestamp by converting it to a familiar date format; convert a human-readable date to a timestamp for use in programs or queries; and debug time-related issues. The live ticking clock provides a real-time reference.

Example Use Cases

  • Converting a log entry's timestamp like `1678886400` to a readable date like '2023-03-15T12:00:00'.
  • Taking a specific date, e.g., '01/01/2025 00:00:00', and converting it to its Unix timestamp for an API call.
  • Using a custom format string like 'dd.MM.yyyy HH:mm' to parse or display dates in a specific regional format.

Pro Tips

  • Seconds vs. Milliseconds: Be aware of whether your timestamp is in seconds or milliseconds. Check the 'Timestamp in Milliseconds' option accordingly. Many systems use seconds, but JavaScript's `Date.now()` provides milliseconds.
  • Custom Formats: Utilize the custom format option with `date-fns` tokens for precise control over parsing and displaying date/time strings. Consult the `date-fns` documentation for all available tokens.
  • Timezones: Unix timestamps are inherently UTC. When converting to a human-readable string, the display will typically be in your browser's local timezone unless a UTC-specific format (like ISO with 'Z') is chosen. When converting from a string to a timestamp, if no timezone offset is present in the string, it's usually parsed as local time.