Now (live):
Epoch (seconds)
Epoch (milliseconds)
ISO-8601 (UTC)
ISO-8601 (Local)
Auto detects 10-digit seconds / 13-digit milliseconds (override below). Accepts decimals for fractional seconds, e.g. 23505.396.
If the input has 5 digits (seconds) or 8 digits (milliseconds), show only the time (no date). Detection uses the integer part only and ignores the decimal fraction.
Enter a timestamp or a date/time to see results.
🔍

    🧭 Overview

    The Epoch / Unix Time Converter turns Unix timestamps into human-readable dates (and back) with exact seconds or milliseconds precision. It supports UTC and your Local time zone (DST-aware), outputs clean ISO-8601 / RFC-3339 strings for APIs and databases, and handles fractional seconds like 23505.396. Copy, export, print, or share a link with your inputs encoded.

    • Epoch → Date (10-digit seconds / 13-digit milliseconds; decimals accepted)
    • Date → Epoch (interpret as UTC or Local)
    • String → Epoch/Date (Auto: ISO-8601 / RFC-2822, or explicit D-M-Y / M/D/Y / Y-M-D)
    • Short-epoch time-only display (5-digit seconds or 8-digit milliseconds)

    ⚙️ How it works

    • Epoch → Date: Units are auto-detected (10→seconds, 13→milliseconds). If a decimal is present (e.g., 23505.396), it’s treated as seconds with fraction. The instant is then rendered in UTC (Z) and Local (with numeric offset, e.g., +01:00 or +02:00).
    • Date → Epoch: The picker emits calendar fields; you choose whether to interpret them as Local or UTC. Outputs include epoch seconds and milliseconds plus ISO/RFC strings in both UTC and Local.
    • String → Epoch/Date: In Auto, we rely on the browser’s parsing for ISO-8601 / RFC-2822. For ambiguous day/month order, pick an explicit format (D-M-Y, M/D/Y, Y-M-D). Optionally Strip “GMT” before parsing to force a Local interpretation.
    • Time-only rule: If enabled, 5-digit seconds or 8-digit milliseconds show only time-of-day (UTC & Local). Digit counting uses the integer part only—fractional tails don’t affect detection.
    • Live “Now”: Updates ~every 200 ms and pauses while an input is focused to avoid jitter.

    🧮 Formulas & Snippets

    Epoch seconds → Date (JS):   new Date(seconds * 1000)
    Epoch millis  → Date (JS):   new Date(milliseconds)
    
    Local date parts → Epoch ms:
      const ms = new Date(y, m-1, d, hh, mm, ss, SSS).getTime();
    
    UTC date parts   → Epoch ms:
      const ms = Date.UTC(y, m-1, d, hh, mm, ss, SSS);
    
    ISO-8601 (UTC):   YYYY-MM-DDTHH:mm:ss.SSSZ
    RFC-3339 (UTC):   Same as above (internet profile of ISO-8601)
    ISO-8601 (Local): YYYY-MM-DDTHH:mm:ss.SSS±HH:MM

    🧪 Examples (tool-accurate)

    1) Epoch → Date (seconds)
    Input:  1700000000
    UTC:    2023-11-14T22:13:20.000Z
    Local:  2023-11-14T23:13:20.000+01:00   (example: Europe/Berlin in standard time)
    
    Epoch (ms): 1700000000000
    
    2) Epoch → Date (milliseconds)
    Input:  0
    UTC:    1970-01-01T00:00:00.000Z
    Local:  1970-01-01T01:00:00.000+01:00   (example: Europe/Berlin in winter)
    
    3) Fractional seconds (Auto treats decimal as seconds)
    Input:  23505.396
    Epoch (ms): 23505396
    UTC:    1970-01-01T06:31:45.396Z
    Local:  1970-01-01T07:31:45.396+01:00   (winter offset example)
    
    If "Time-only for short epochs" is enabled:
    - 5-digit seconds like 23505 → show only Time (UTC/Local)
    - 8-digit milliseconds like 23505396 (with Units=Milliseconds) → show only Time
    
    4) Date/Time → Epoch (interpret as UTC)
    Input:  1970-01-01T00:00:00.000  (UTC)
    Epoch (s):  0
    Epoch (ms): 0
    
    5) Date/Time → Epoch (interpret as Local)
    Input:  2024-03-31T01:30:00.000  (Europe/Berlin, before spring DST jump)
    UTC:    2024-03-31T00:30:00.000Z
    Epoch (s): 1711845000
    Epoch (ms): 1711845000000
    
    6) String → Epoch/Date (Auto / RFC-2822)
    Input:  Fri, 21 Nov 1997 09:55:06 GMT
    UTC:    1997-11-21T09:55:06.000Z
    Epoch (s):  880106106

    ⚠️ Common Pitfalls & Tips

    • Seconds vs. Milliseconds: 10 digits → seconds; 13 digits → milliseconds. Use the unit selector to override when needed.
    • Fractional inputs: 23505.396 are seconds with fraction in Auto. To treat 8 digits as milliseconds, set Units to Milliseconds.
    • DST differences: Local time can jump or repeat around DST transitions. That’s why results show both UTC and Local.
    • Negative timestamps: Times before 1970-01-01 are supported; you can enter negative seconds or milliseconds.
    • Ambiguous date strings: For 01/02/2025, pick M/D/Y vs D-M-Y explicitly to avoid day/month swaps.
    • Group separators: Inputs like 1,700,000,000 or 1 700 000 000 are accepted—grouping is stripped.
    • 2038 problem: Some 32-bit systems overflow after 2038-01-19. Browsers here use 64-bit float time internally, so modern environments handle far future dates—but extremely large epochs may still be out-of-range.

    🧩 Popular Use Cases

    • Quickly converting Unix time in logs, webhooks, and analytics exports.
    • Generating ISO-8601 / RFC-3339 timestamps for REST APIs, databases, and CSVs.
    • Verifying DST edge cases by comparing UTC vs Local outputs.
    • Parsing mixed date strings (RFC-2822, ISO-8601, D-M-Y / M/D/Y / Y-M-D) in support and QA workflows.
    • Copying epoch milliseconds for systems that require ms precision (e.g., BigQuery, Kafka, Firehose).

    ❓ FAQs

    What is Unix epoch time?
    It’s the number of seconds (or milliseconds) elapsed since 1970-01-01T00:00:00Z. Leap seconds are ignored; time is a continuous count.
    How do I know if my timestamp is in seconds or milliseconds?
    By convention: 10 digits ≈ seconds, 13 digits ≈ milliseconds. Use the Epoch units selector to override if necessary.
    Does the converter support fractional seconds like 23505.396?
    Yes. In Auto units, decimals are treated as seconds with fractions. 23505.39623505396 ms → UTC 1970-01-01T06:31:45.396Z.
    What does “Time-only display for short epochs” do?
    If enabled, 5-digit seconds or 8-digit milliseconds show only time-of-day (no date). For 8-digit milliseconds, set Units = Milliseconds.
    What’s the difference between ISO-8601 and RFC-3339?
    RFC-3339 is an internet profile of ISO-8601. UTC looks like 2025-09-12T08:15:30.000Z, local like 2025-09-12T10:15:30.000+02:00.
    Why show both UTC and Local?
    To avoid confusion with DST and time zone offsets. The same instant renders differently in Local vs UTC; showing both makes auditing easy.
    My input says “GMT”. Can I treat it as Local instead?
    Yes—enable Strip “GMT” in the String mode to remove the token before parsing and interpret the remainder as Local.
    Can I convert dates before 1970?
    Yes. Enter negative seconds or milliseconds (e.g., -1 s → 1969-12-31T23:59:59Z).
    Why does the datetime picker look Local even when I choose “Interpret as UTC”?
    The input control always renders in Local. Your selection tells the converter how to interpret those fields internally (as UTC or Local) before computing the epoch.
    Will extremely large timestamps work?
    Browsers use a double-precision time representation; very large magnitudes may be out of range. The tool will display an “out of range” message rather than a wrong value.
    How do I share a specific conversion?
    Click Share Link to copy a URL with your inputs (mode, values, options) encoded. Opening it restores the same state and auto-runs.
    Do you support RFC-2822 (email date) strings?
    Yes—use Auto in String mode and paste e.g., Fri, 21 Nov 1997 09:55:06 GMT. You’ll get UTC/Local displays and epoch values (880106106 s).
    What about the Year-2038 problem?
    That’s a 32-bit signed integer limit for seconds since epoch. Modern JS engines and most databases avoid this, but legacy systems may not. This converter itself is not limited to 32-bit.
    Why is my local time off by one hour sometimes?
    Likely due to daylight saving transitions. Compare UTC vs Local in the results; the offset (e.g., +01:00 vs +02:00) will reveal the shift.

    📚 Sources & Attribution

    • ISO-8601 — Date and time formatting standard
    • RFC-3339 — Date and Time on the Internet: Timestamps
    • RFC-2822 — Internet Message Format (email dates)
    • ECMAScript Date — Time values, UTC vs Local behavior