Unix Timestamp Converter: Epoch Time Made Simple
Look inside almost any database, log file, or API response and you'll find dates stored as plain numbers like 1700000000. That's a Unix timestamp, and being able to convert it to a human date (and back) is a small skill that saves developers time every day. This guide explains what epoch time is and how to work with it.
What is a Unix timestamp?
A Unix timestamp is the number of seconds that have elapsed since midnight UTC on 1 January 1970 — a moment known as the "Unix epoch". So 1700000000 isn't a random number; it's a precise instant, counted in seconds from that starting point. Some systems use milliseconds instead, giving a larger number like 1700000000000.
Why store time as a number?
Representing time as a single integer has real advantages:
- It's unambiguous. No time-zone confusion, no date-format arguments ("is 03/04 March or April?"). A timestamp is one exact instant.
- It's easy to compare and sort. Comparing two moments is just comparing two numbers.
- It's compact and universal. One integer works across languages, databases, and systems.
- Arithmetic is trivial. "One hour later" is just "+3600 seconds".
The trade-off is readability — 1700000000 means nothing to a human at a glance, which is exactly where a converter comes in.
How to convert a timestamp
- Open the Timestamp Converter.
- To go from a number to a date, paste the timestamp — it shows local time, UTC, ISO 8601, and a relative time.
- To go the other way, pick a date and time and get the Unix value in seconds and milliseconds.
- Copy whichever format you need.
It even shows the live current Unix time, handy for testing. Everything runs in your browser.
Seconds or milliseconds?
This is the most common gotcha. Unix timestamps come in two scales:
- Seconds — the classic form (10 digits for current dates), used by many systems and Unix tools.
- Milliseconds — used by JavaScript's
Dateand many APIs (13 digits for current dates).
Mix them up and your date lands in 1970 or 54,000 years in the future. The converter detects the magnitude and interprets your input correctly either way, and gives you both when converting a date, so you can hand the right one to whatever system you're feeding.
Understanding the formats
- Local time — the instant in your own time zone.
- UTC — the same instant in Coordinated Universal Time, the reference all timestamps share.
- ISO 8601 — a standardised string like
2023-11-14T22:13:20.000Z, the safest format for storing and exchanging dates in text. - Relative — a human phrasing like "3 days ago", useful in interfaces.
Where this comes up
- Reading logs and database rows that store timestamps as numbers.
- Debugging APIs that return epoch times.
- Checking token expiry (JWT
expandiatare Unix seconds — pair with our JWT Decoder). - Scheduling and comparisons in code.
- Converting between systems that disagree on seconds vs milliseconds.
Time zones, UTC, and the Year 2038
Two subtleties trip up developers working with timestamps. The first is time zones. A Unix timestamp itself has no time zone — it's a count of seconds from a fixed UTC instant, so it represents the same moment everywhere on Earth. Time zones only enter the picture when you display that instant to a human. This is actually a feature: store everything as UTC timestamps and you never have to reason about zones in your data, only at the edges when you show a date to a user. A huge share of date bugs come from mixing zones in storage; timestamps sidestep that entirely.
The second is the famous Year 2038 problem. Systems that store Unix time in a signed 32-bit integer can only count up to early 2038, after which the number overflows and wraps around to a negative — the millennium bug's younger sibling. Modern systems have largely moved to 64-bit timestamps, which push the limit billions of years into the future, but legacy systems and embedded devices can still be vulnerable. It's a good reason to check what size integer any older system uses for time.
For everyday work, neither issue changes how you convert a timestamp — but knowing they exist explains a lot of otherwise-baffling date behaviour, and marks the difference between using timestamps and truly understanding them.
Related tools
- JSON Formatter — format API responses containing timestamps.
- JWT Decoder — read token expiry times.
- UUID Generator — generate unique IDs.
- Unit Converter — convert other units.
Storing time the sane way
The practical takeaway from all of this is a simple storage rule: store time as a UTC timestamp, and convert to a local, human-readable format only at the moment you display it. This keeps your data unambiguous, makes sorting and comparison trivial, and confines all the messy time-zone logic to the presentation layer where it belongs. Avoid storing dates as free-form strings, which invite format confusion, and be consistent about whether you use seconds or milliseconds throughout a system. Follow that discipline and an entire category of date bugs simply never happens — which is exactly why so much software represents time as a plain number under the hood.
Common questions
Does it accept seconds or milliseconds? Both. It detects the magnitude and interprets your input as seconds or milliseconds automatically.
What formats does it show? Local time, UTC, ISO 8601, and a relative time like "3 days ago".
Can I convert a date back to a timestamp? Yes — pick a date and time to get the Unix value in seconds and milliseconds.
Is anything uploaded? No. All conversions run locally in your browser.
Why did my timestamp show the year 1970? You likely passed seconds where milliseconds were expected (or vice versa). Check the scale.
The bottom line
A Unix timestamp is just a count of seconds from 1970 — unambiguous for machines, opaque for humans. Convert between epoch time and readable dates, in seconds or milliseconds, with our free Timestamp Converter.
Prime Webkit builds free tools like this, and develops web apps where dates, time zones, and data are handled correctly. If you're building something like that, our app team can help.
Have an app idea worth building?
From prototype to store-ready release — we ship cross-platform apps.