Epoch & Unix Timestamp Converter
Convert in any unit, do date math, batch-process lists, and copy as code in 6 languages — all locally in your browser.
2147483647 (Jan 19, 2038 03:14:07 UTC). 64-bit systems are fine.
Paste a list of timestamps (one per line, or comma/space separated). Each is auto-detected.
Copy the current timestamp as code in your language of choice.
How to use
- Paste any timestamp into the input field — seconds, milliseconds, microseconds, nanoseconds, or an ISO 8601 date string.
- Auto-detect picks the unit by digit count, or override it manually using the dropdown.
- Use the + / − buttons to add or subtract days, hours, weeks, months, etc. — math chains, output updates instantly.
- Switch to Batch to paste a list and get a table you can copy as CSV or markdown.
- Open Code snippets to copy the equivalent expression in Python, JavaScript, Bash, SQL, Go, or Rust.
- Click Copy permalink to share a URL that round-trips your exact input, unit, and timezone selection.
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds since January 1, 1970 UTC (the Unix epoch). It's the standard time representation in most operating systems and programming languages — POSIX systems, databases, log formats, JWT claims like iat/exp, and most APIs use it.
How do I know if my timestamp is seconds, milliseconds, microseconds, or nanoseconds?
By digit count for dates near today: seconds have 10 digits, milliseconds 13, microseconds 16, nanoseconds 19. This tool auto-detects when you paste, but you can override the unit at any time. The auto-detect line under the input shows what unit was matched.
How does the date math feature work?
Enter any timestamp, then pick a unit (seconds, minutes, hours, days, weeks, months, years) and click + or − to apply. Operations chain, and the converted output and timezones update instantly. Months and years account for variable length (a "month" snaps to the same day-of-month in the result).
Can I convert many timestamps at once?
Yes. Switch to Batch mode and paste a list separated by newlines, commas, tabs, or spaces. You get back a table with the original input, the parsed unit, the ISO 8601 form, and a flag for malformed rows. Copy as CSV or markdown for paste-into-a-spreadsheet or doc workflows.
How accurate are the displayed times?
They use your browser's IANA time zone database — the same one used by Node.js, Python, and modern operating systems. DST transitions are handled correctly. Microsecond and nanosecond precision is preserved internally as JavaScript BigInt, then formatted only on display.
What's the Y2038 problem?
32-bit signed Unix timestamps overflow on January 19, 2038 at 03:14:07 UTC. Systems still using 32-bit time will wrap to a negative number (the lowest representable date). 64-bit time (used in nearly every modern OS, language, and database) is unaffected for roughly 292 billion years.
Does any data leave my browser?
No. All conversion, math, and timezone resolution happen locally with the JavaScript Intl API and BigInt. You can verify by opening DevTools → Network tab and confirming there are zero requests when you paste or click. Source on GitHub.
Can I share a permalink to a specific timestamp?
Yes. The URL hash encodes your current input, unit, and timezone selection. Copy the URL bar (or use the Copy permalink button) to share an exact view. Opening the URL in a new tab restores the same state.
Why is my pasted timestamp showing the wrong year?
Most likely a unit mismatch — for example, pasting milliseconds while the tool is set to seconds, or vice versa. Use auto-detect or pick the unit explicitly from the dropdown. Dates before 1970 require a negative timestamp; the tool accepts negative numbers.
What code snippets are available?
Click the Code snippets tab to see the equivalent expression in Python (using datetime.fromtimestamp + zoneinfo), JavaScript (using Date), Bash (using the GNU date command), SQL (PostgreSQL to_timestamp and MySQL FROM_UNIXTIME), Go, and Rust. Each snippet copies cleanly.
Examples
API debugging
Your API returns "created_at": 1779424668 — paste it, see May 21, 2026 12:04:28 UTC, then click +1 day to compute the expiration timestamp.
1779424668 → 2026-05-21T12:04:28Z +1 day → 1779511068
Log analysis
Server logs use milliseconds: 1779424668123. Auto-detect picks ms by 13-digit count. Switch to Batch to convert a thousand log lines into a readable CSV.
1779424668123 → 2026-05-21T12:04:28.123Z
JWT expiration
JWT exp claim is 1779514668. Convert + subtract now → "expires in 25 hours." Use the code-snippet tab to grab the Python equivalent for your validator.
1779514668 - now ≈ 25 hours from now
About Unix and epoch timestamps
The Unix epoch is one of the most-used numeric formats in computing: it's how nearly every operating system, database, programming language, and API expresses a point in time. Seconds since 1970 was the original POSIX definition; modern systems extend the same idea to milliseconds (JavaScript's Date.now()), microseconds (Python's time.time_ns() / 1000), and nanoseconds (Go's time.Now().UnixNano()). Whenever you read a created_at, a iat/exp JWT claim, a Kafka offset timestamp, or a log line timestamp, you're seeing an epoch.
The unit ambiguity is where most bugs live. A 13-digit timestamp pasted into a tool expecting seconds renders as a date 50,000 years in the future. A 10-digit timestamp pasted into a millisecond field shows up as 1970. This converter auto-detects by digit count and surfaces the mismatch immediately, so the unit confusion never makes it into production code.
For batch processing — paginating through API responses, normalizing log files, fixing CSV exports — the Batch tab handles arbitrary delimiters (newline, comma, tab, space) and emits a clean table you can copy directly into a spreadsheet, a doc, or a SQL INSERT. For one-off lookups, the Single tab does it all in milliseconds, with full IANA timezone support including DST. For developers, the Code snippets tab generates the right expression in Python, JavaScript, Bash, SQL, Go, and Rust so you don't have to remember whether datetime.fromtimestamp takes seconds or milliseconds (it's seconds, plus a fractional part for sub-second precision).
Privacy: nothing you paste here ever leaves your browser. The tool is a single HTML file under 50 KB, runs entirely in client JavaScript, and reads nothing back. You can verify in DevTools or read the source on GitHub. If you've used JSONFormatter.org or CodeBeautify.org in the last few years, you've seen the cost of pasting sensitive data into a tool that quietly saves it server-side; we built this in part as a reaction to that pattern.