Skip to main content

Unix Epoch Converter

Convert Unix timestamps to human-readable dates and back. Supports seconds and milliseconds, multiple timezones, relative time display, and ISO 8601 / RFC 2822 formats. Includes a live epoch clock.

✓ 60K+ developers trust DevPlaybook ✓ Runs 100% in your browser ✓ 19 timezones supported

Real-World Use Cases

1. Debugging API Token Expiry Times

Your JWT token has "exp": 1712300000 in the payload. Paste the epoch value here to see exactly when the token expires in your local timezone — no mental math needed.

Input (seconds)

1712300000

Converted Output

Fri Apr 05 2024 14:13:20 UTC
ISO: 2024-04-05T14:13:20.000Z
Relative: about 2 years ago

→ Token is long expired!

2. Converting JavaScript Date.now() Milliseconds

You see 1712345678901 in a console log from Date.now(). The tool auto-detects it's milliseconds (13 digits) and converts it correctly without you needing to divide by 1000.

Input (milliseconds)

1712345678901

Auto-Detected & Converted

Format: milliseconds (auto)

Fri Apr 05 2024 14:54:38 UTC
RFC 2822: Fri, 05 Apr 2024
  14:54:38 +0000

3. Creating Epoch Timestamps for Database Queries

You need to filter records created after a specific date. Switch to "Date → Epoch" mode, enter the date, and get the epoch value for your SQL WHERE created_at > clause.

Input Date

2026-01-01 00:00:00
Timezone: Asia/Taipei (UTC+8)

Epoch Output

Seconds:      1767196800
Milliseconds: 1767196800000

SQL: WHERE created_at >
  1767196800

How to Use — Step by Step

  1. Choose direction — Select "Epoch → Date" to decode a timestamp, or "Date → Epoch" to generate one.
  2. Enter your value — Paste a Unix timestamp (10 or 13 digits) or type a date in YYYY-MM-DD HH:MM:SS format.
  3. Select timezone — Choose from 19 common timezones. The conversion adjusts automatically for UTC offset.
  4. Read the output — See the result in multiple formats: human-readable, ISO 8601, RFC 2822, and relative time (e.g. "3 days ago").
  5. Copy — Click copy to grab the value you need for your code, database query, or API request.

Frequently Asked Questions

What is a Unix epoch timestamp?▼

Unix epoch (or Unix time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It is a standard way to represent timestamps in programming because it is timezone-independent, compact, and easy to compare and calculate with.

How do I convert epoch to a human-readable date?▼

Paste your Unix timestamp into the 'Epoch → Date' field. The tool converts it instantly to multiple formats: human-readable, ISO 8601, RFC 2822, and relative time (e.g. '3 days ago'). Select any timezone to see the local time.

How do I convert a date to epoch?▼

Switch to 'Date → Epoch' mode. Enter your date in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format, select the timezone the date is in, and the tool outputs the Unix epoch in both seconds and milliseconds.

What is the difference between seconds and milliseconds epoch?▼

Most Unix systems use seconds (10-digit numbers like 1700000000). JavaScript's Date.now() and many APIs use milliseconds (13-digit numbers). The tool auto-detects which one you entered and you can switch with the dropdown.

Why do some APIs use milliseconds instead of seconds?▼

JavaScript's Date object works in milliseconds, so many web APIs (Redis, Kafka, browser localStorage) follow suit. Database systems like PostgreSQL typically use seconds. Always check the API documentation to avoid off-by-1000x bugs.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Unix Timestamp Converter Timestamp Converter Pomodoro Timer YAML to TOML Converter Color Format Converter Timezone Converter YAML to TOML Converter Color Format Converter — HEX, RGB, HSL, HSV Game Loop Calculator Countdown Timer JSON ↔ YAML Converter String Case Converter Text ↔ Binary ↔ Hex Converter TOML to JSON Converter WebP Converter YAML to JSON Converter CSV JSON Transformer IPFS CID Version Converter Bandwidth Calculator Number System Converter — Binary Octal Decimal Hex TTFB Analyzer API Rate Limit Calculator API Response Time Tester Aspect Ratio Calculator Base64 Encoder & Decoder Base64 Encode / Decode chmod Calculator Code Tools Color Picker & Code Converter CSS Unit Converter CSV to JSON Converter HTML to Markdown Converter Image to Base64 Converter JSON to CSV Converter Number Base Converter Regex Tester Pro URL Slug Generator Text Tools TypeScript Playground TypeScript to JavaScript Converter Developer Utilities UUID Generator UUID v7 Generator Word Counter & Text Statistics Zod Schema Generator Cron Expression Tester Markdown to HTML Converter TOTP Code Generator Cron Expression Validator Cron Expression Explainer TOTP Generator TOML to JSON Converter Protobuf to JSON Converter JSON Schema to Zod Converter SQL to TypeScript Types Jest to Vitest Migrator Solana Program ID Generator Morse Code Converter Roman Numeral Converter Bundle Size Impact Calculator React Native StyleSheet Generator Bundle Size Budget Calculator Password Strength Analyzer Redis TTL Calculator

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →