Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa. Supports seconds, milliseconds, ISO 8601, and timezone selection.
Last updated:
Current Time
Unix (seconds)
1784468143
Unix (ms)
1784468143185
ISO 8601
2026-07-19T13:35:43.185Z
UTC
Sun, 19 Jul 2026 13:35:43 GMT
Timestamp → Date
Date → Timestamp
Convert Unix timestamps to human-readable dates (and vice versa) in seconds or milliseconds, in any timezone. Detection is automatic.
What is Timestamp Converter?
A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment called the Unix epoch. Because it's a single number in UTC, it's the canonical way to represent 'a moment in time' in databases, logs, and APIs, immune to timezone and DST confusion.
How to convert Unix timestamps
- 1Paste a timestamp (10-digit seconds or 13-digit milliseconds) — the tool auto-detects the unit.
- 2The converted date is shown in UTC and in your local timezone.
- 3To go the other direction, pick a date/time in the calendar; the timestamp appears instantly.
- 4Switch timezone with the dropdown to see the same instant in different regions.
Use Cases
Debug 'stale token' errors
Decode `exp` and `iat` claims from JWTs, session cookies, or signed URLs to see if they're actually expired.
Read log timestamps
Cloud logs (AWS CloudWatch, Datadog, structured JSON logs) often store timestamps as epoch millis — paste them here to make sense of them.
Schedule cron / cron-like jobs
Convert a target run time in your local timezone to UTC epoch, then feed it into your scheduler.
Compare timestamps across services
When two systems disagree on 'now', dropping both timestamps here quickly reveals clock skew or timezone mistakes.
Code Examples
Current Unix timestamp in JS
// seconds
const s = Math.floor(Date.now() / 1000);
// milliseconds
const ms = Date.now();
// from timestamp
const d = new Date(s * 1000);Unix timestamp in Python
import time, datetime
s = int(time.time()) # seconds
ms = int(time.time() * 1000) # milliseconds
d = datetime.datetime.fromtimestamp(s)Unix timestamp in Go
import "time"
s := time.Now().Unix()
ms := time.Now().UnixMilli()
t := time.Unix(s, 0)Unix timestamp in SQL
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
-- MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1700000000);Key Concepts
- Epoch
- The reference point from which time is measured. Unix epoch is 1970-01-01 00:00:00 UTC; other systems use different epochs (Windows FILETIME: 1601, NTP: 1900).
- Seconds vs milliseconds
- 10-digit numbers are seconds; 13-digit numbers are milliseconds. Rule of thumb: JavaScript uses ms (`Date.now()`), most other languages use seconds by default.
- ISO 8601
- A human- and machine-readable date format (`2024-01-15T12:30:45Z`). Preferred for APIs because it's timezone-explicit.
- Year 2038 problem
- 32-bit signed epoch overflows on 2038-01-19 03:14:07 UTC. Modern systems use 64-bit timestamps and are fine until year 292 billion.
Tips & Best Practices
- ▸Always store timestamps in UTC. Convert to local time only at the presentation layer.
- ▸In JavaScript, `Date.now()` returns milliseconds; the Unix convention is seconds. Divide by 1000 when talking to non-JS systems.
- ▸JWT `exp` and `iat` are always in seconds, per RFC 7519. Passing milliseconds is a common bug.
- ▸Never do timezone math manually. Use `date-fns-tz`, `luxon`, `dayjs/plugin/timezone`, or Python `zoneinfo` — DST rules change and manual offsets go stale.
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 (the Unix epoch), excluding leap seconds.
Does the tool detect seconds vs milliseconds automatically?
Yes. Timestamps with 13 digits are treated as milliseconds; 10 digits are treated as seconds. You can also switch manually.
Related Tools
Cron Parser
Parse and explain cron expressions in plain English. See the next 5 upcoming run times for any schedule.
JSON Formatter
Format, beautify, and validate JSON online. Free, fast, and 100% local — your data never leaves your browser.
JSON Validator
Validate JSON online with instant error location and structure statistics (depth, keys, node types). 100% local — your JSON never leaves the browser.
JSON → TypeScript
Convert JSON to TypeScript interfaces instantly. Generate strongly-typed TS types from any JSON sample.
JSON → Go
Convert JSON to Go structs online. Generates idiomatic Go structs with proper json tags and PascalCase field names.
JSON → YAML
Convert JSON to YAML online. Preserve structure, comments-free, and ready to paste into Kubernetes or CI configs.