Unix Timestamp Converter
A timestamp that looks wrong by decades may simply use the wrong unit. Select seconds or milliseconds explicitly and compare both UTC and the timezone reported by your device. You can also turn a local calendar selection into a Unix value or capture the current time. UTC output is suitable for comparing events across systems; local output helps explain what a person sees in their own timezone. For dates around daylight-saving changes, confirm how the source system resolves repeated or skipped local times.
Your workspace
Runs locally in your browserResult
Your input is processed locally in your browser unless explicitly stated otherwise. Inputs are not saved by this tool.
How to use this tool
Choose the unit explicitly, enter a number, and convert. Alternatively select a local date and convert it to Unix time.
Example
Input
1704067200 secondsOutput
2024-01-01T00:00:00.000ZWhat does this tool do?
Unix time counts elapsed time from 1 January 1970 at 00:00:00 UTC. APIs commonly use seconds while JavaScript dates use milliseconds.
Common mistakes and limitations
Local times depend on your device timezone and daylight-saving rules. Ambiguous local times use your browser’s interpretation. Leap seconds are not represented.
One epoch, two common units
Unix time counts from 1970-01-01T00:00:00Z. Many APIs use seconds; JavaScript Date uses milliseconds. Contemporary second values often have ten digits and millisecond values thirteen, but digit count is only a hint, not a specification. Choose the unit stated by the API or database. Multiplying seconds by 1000 converts to milliseconds, while fractional seconds may require a rounding decision when a consumer accepts only integers.
Unix seconds: 1704067200
Unix milliseconds: 1704067200000
UTC: 2024-01-01T00:00:00.000ZUTC and local time describe the same instant
A timestamp has no local timezone label built into it. UTC output gives a stable representation for logs and service boundaries. Local output uses the browser device settings and may differ from a teammate’s machine. A calendar input without a timezone needs an explicit interpretation; do not silently assume a wall-clock appointment in one region is UTC. Named timezones and daylight-saving rules need a timezone-aware library when scheduling recurring events.
Range and storage mistakes
The year 2038 issue concerns systems using signed 32-bit Unix seconds, not every timestamp representation. Newer systems and JavaScript numbers may support a wider range, while individual databases still impose limits. Negative timestamps describe instants before the epoch. Check rounding around zero when converting fractional milliseconds to whole seconds. For Flutter code, use the Dart DateTime converter to generate a constructor that states its unit and UTC interpretation explicitly.
Check boundaries in logs and fixtures
Use a known instant such as midnight UTC as a sanity check before converting a whole set of records. If a value unexpectedly lands near 1970 or thousands of years away, revisit the seconds/milliseconds choice. Compare at least one value with the system that produced it. In tests, record both the numeric timestamp and an explicit UTC string so a future reader can understand the expected instant.
Frequently asked questions
How do I distinguish seconds from milliseconds?
Check the source API documentation. Contemporary seconds are commonly 10 digits and milliseconds 13, but digit count is not a reliable rule for every date.
Related tools
Dart DateTime Converter
Convert ISO dates or Unix timestamps to Dart DateTime code and epoch values.
Open tool Security & GeneratorsJWT Decoder
Inspect JWT headers and payloads locally.
Open tool Flutter & Dart ToolsJSON to Dart Converter
Generate null-safe Dart models from a JSON object.
Open tool