Skip to main content

    Unix Timestamp Converter

    Convert between Unix timestamps and human-readable dates. Supports seconds and milliseconds.

    Free to use. Runs in your browser.

    Enter a Unix timestamp to convert to a readable date, or enter a date to get its Unix timestamp.

    Current Unix time:0

    What Is a Unix Timestamp?

    A Unix timestamp is the number of seconds since January 1, 1970 00:00:00 UTC, a moment known as the "Unix epoch." Right now, the timestamp is somewhere around 1.78 billion. It's how computers have tracked time for over 50 years: one single number, no time zones, no formatting ambiguity.

    Think of it as a universal clock. While humans argue about whether "01/02/2025" means January 2nd or February 1st (it depends which country you're in), computers just store 1735776000 and convert to whatever format the user needs. Every database, every API, every log file understands Unix timestamps.

    This converter lets you go both ways: paste a Unix timestamp to see the human-readable date, or pick a date to get the timestamp. It handles seconds (10 digits) and milliseconds (13 digits, what JavaScript uses). All conversions run in your browser.

    Notable Unix Timestamps

    TimestampDate (UTC)Significance
    01 Jan 1970 00:00:00The Unix epoch, where it all began
    10000000009 Sep 2001 01:46:40One billion seconds, celebrated with "billion second" parties
    123456789013 Feb 2009 23:31:30Sequential digits. Developers threw "Unix time parties"
    170000000014 Nov 2023 22:13:201.7 billion seconds milestone
    200000000018 May 2033 03:33:20Two billion seconds, Y2K38 approaches
    214748364719 Jan 2038 03:14:07Y2K38, 32-bit signed integer overflow. Systems using int32 will break
    41024448001 Jan 2100 00:00:00Turn of the next century. 64-bit timestamps handle this easily

    Y2K38 matters today. If your system stores timestamps as 32-bit signed integers, it will overflow on 19 January 2038. Embedded systems, IoT devices, and legacy databases are most at risk. Most modern systems use 64-bit integers, which last until the year 292 billion. Check your database column types, INT(10) in MySQL is 32-bit.

    Time Zone Reference

    Unix timestamps are always UTC. When you convert to a human-readable date, you need to know the target time zone. Search below to find the offset and DST rules for any zone.

    AbbreviationUTC OffsetRegion
    UTC+00:00Global
    GMT+00:00UK, Iceland, West Africa
    BST+01:00UK
    CET+01:00France, Germany, Spain, Italy
    CEST+02:00France, Germany, Spain, Italy
    EET+02:00Finland, Greece, Romania, Turkey
    MSK+03:00Russia (Moscow, St Petersburg)
    GST+04:00UAE, Oman, Bahrain
    IST+05:30India
    ICT+07:00Thailand, Vietnam, Cambodia
    CST/SGT+08:00China, Singapore, Hong Kong, Taiwan
    JST+09:00Japan
    KST+09:00South Korea
    AEST+10:00Sydney, Melbourne, Brisbane
    NZST+12:00New Zealand
    EST−05:00New York, Toronto, Miami
    EDT−04:00New York, Toronto, Miami
    CST−06:00Chicago, Dallas, Mexico City
    MST−07:00Denver, Phoenix, Calgary
    PST−08:00Los Angeles, San Francisco, Seattle
    AKST−09:00Alaska
    HST−10:00Hawaii
    BRT−03:00São Paulo, Rio, Brasília
    ART−03:00Argentina
    WAT+01:00Nigeria, Cameroon, Angola
    EAT+03:00Kenya, Ethiopia, Tanzania
    SAST+02:00South Africa

    Showing 27 of 27 time zones.

    Timestamps in Every Language

    Every programming language has a different way to get, create, and convert timestamps. Some return seconds, some return milliseconds, mixing them up is the #1 timestamp bug.

    LanguageGet CurrentUnit
    JavaScriptDate.now()Milliseconds (ms)
    Pythonimport time; time.time()Seconds (float)
    PHPtime()Seconds
    JavaSystem.currentTimeMillis()Milliseconds
    C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()Seconds
    RubyTime.now.to_iSeconds
    Gotime.Now().Unix()Seconds
    RustSystemTime::now().duration_since(UNIX_EPOCH)Duration
    SQL (MySQL)UNIX_TIMESTAMP()Seconds
    SQL (PostgreSQL)EXTRACT(EPOCH FROM NOW())Seconds (float)
    Bashdate +%sSeconds
    SwiftDate().timeIntervalSince1970Seconds (Double)
    KotlinSystem.currentTimeMillis()Milliseconds

    ISO 8601 vs Unix Timestamps

    Unix Timestamp

    1713052800

    Compact, unambiguous, easy to sort and compare mathematically. No time zone confusion, always UTC. But completely unreadable to humans. You need a converter to know what date it represents.

    Best for: Database storage, computation, compact APIs, log ordering

    ISO 8601

    2024-04-14T00:00:00Z

    Human-readable, self-documenting, includes time zone info. Standard for REST APIs and JSON. Slightly larger payload but anyone can read it without tooling.

    Best for: APIs, logs, user-facing data, JSON responses, debugging

    Rule of thumb: Use Unix timestamps for internal storage and computation. Use ISO 8601 for APIs, logs, and anything humans might read. Most frameworks convert between them with a single function call.

    Worked Example: Debugging JWT Expiration

    The situation: A user reports they're getting logged out after 5 minutes instead of the expected 24 hours. The auth system uses JWTs with an `exp` (expiration) claim stored as a Unix timestamp.

    Step 1: Decode the JWT

    Using the JWT Decoder, the payload shows: "exp": 1713053100, "iat": 1713052800. The iat (issued at) and exp are both Unix timestamps in seconds.

    Step 2: Convert the timestamps

    Paste 1713052800 (iat) into this converter: April 14, 2024 00:00:00 UTC. Paste 1713053100 (exp): April 14, 2024 00:05:00 UTC. The token expires 5 minutes after creation, not 24 hours.

    Step 3: Find the bug

    The backend code: `exp: Math.floor(Date.now() / 1000) + 300`. 300 seconds = 5 minutes. The developer meant to write 86400 (24 hours in seconds) but used 300 instead. A simple arithmetic error caught by converting the actual timestamp.

    Fix

    Change `+ 300` to `+ 86400`. Better yet, use a named constant: `const TOKEN_LIFETIME_SECONDS = 24 * 60 * 60`. Self-documenting and harder to get wrong.

    Common Mistakes

    Seconds vs milliseconds

    JavaScript's Date.now() returns milliseconds (13 digits: 1713052800000). Most other languages return seconds (10 digits: 1713052800). Mixing them gives you dates in the year 56,000 or in January 1970. Always check the digit count.

    Ignoring time zones when displaying

    Unix timestamps are always UTC. If you display the raw converted date to a user in New York (UTC−5), their events will show 5 hours ahead. Always convert to the user's local time zone for display.

    Storing local time as timestamp

    Converting a local time (e.g., "3pm London time") to a timestamp without specifying the time zone. During BST (UTC+1), 3pm London is 2pm UTC. During GMT, 3pm London is 3pm UTC. Always specify the zone.

    Using 32-bit integers

    A 32-bit signed int maxes out at 2,147,483,647, January 19, 2038. If your database column is INT (not BIGINT), timestamps after 2038 will overflow. Migrate to 64-bit now, not in 2037.

    Assuming all days are 86400 seconds

    Days with DST transitions are 23 or 25 hours. If you add 86400 seconds to "2am Sunday" when clocks spring forward, you get "3am Monday" instead of "2am Monday." Use date libraries that handle DST.

    Clock drift in distributed systems

    Different servers may have slightly different clocks. A JWT issued by Server A at timestamp T may be rejected as "not yet valid" by Server B whose clock is 2 seconds behind. Use NTP sync and add clock skew tolerance.

    Related Tools

    How to use this tool

    1

    Enter a Unix timestamp to convert to a readable date, or select a date to convert

    2

    The tool auto-detects seconds (10 digits) vs milliseconds (13 digits)

    3

    Copy any output format, local time, UTC, ISO 8601, or raw timestamp

    Common uses

    • Converting API timestamps to readable dates
    • Debugging JWT token expiration times
    • Converting log file timestamps for analysis
    • Comparing timestamps across different systems

    Share this tool

    Frequently Asked Questions

    What is a Unix timestamp?
    A Unix timestamp is the number of seconds since January 1, 1970 00:00:00 UTC (the 'Unix epoch'). Right now it's around 1.7 billion. It's how computers track time, one single number, no time zones, no formatting ambiguity.
    Does this handle milliseconds?
    Yes. If you enter a 13-digit number, it's automatically treated as milliseconds (what JavaScript's Date.now() returns). 10-digit numbers are treated as seconds. The tool auto-detects based on digit count.
    What time zone is the output in?
    Both your local time zone and UTC are shown. Unix timestamps are always UTC internally, the timezone is only applied when displaying human-readable dates.
    Why does JavaScript use milliseconds instead of seconds?
    JavaScript's Date.now() returns milliseconds for higher precision. Most other languages (Python, PHP, Ruby) use seconds. This is the #1 source of timestamp bugs, always check whether you're working with 10-digit (seconds) or 13-digit (milliseconds) values.
    What is the Year 2038 problem?
    32-bit signed integers overflow on 19 January 2038 at 03:14:07 UTC, the timestamp hits 2,147,483,647 and wraps to a negative number. Systems using 32-bit timestamps will break. Most modern systems use 64-bit integers, which last until the year 292 billion.
    Can timestamps be negative?
    Yes. Dates before 1 January 1970 have negative timestamps. 31 December 1969 23:59:00 UTC is -60. Some systems don't handle negative timestamps correctly, so test if your application needs historical dates.
    How do I get the current timestamp in different languages?
    JavaScript: Date.now() (ms) or Math.floor(Date.now()/1000) (s). Python: import time; time.time(). PHP: time(). Ruby: Time.now.to_i. Go: time.Now().Unix(). Bash: date +%s.
    What's the difference between Unix time and ISO 8601?
    Unix time is a number (1700000000). ISO 8601 is a formatted string ('2023-11-14T22:13:20Z'). Both represent the same moment. APIs often accept both. ISO 8601 is human-readable; Unix time is compact and unambiguous.
    Does Unix time account for leap seconds?
    No. Unix time pretends every day is exactly 86,400 seconds. When a leap second occurs, Unix time either repeats a second or skips one, depending on the system. For 99.99% of applications, this doesn't matter.
    Is my data sent to a server?
    No. All conversion happens locally in your browser. Timestamps are generated and parsed using JavaScript's built-in Date object. Nothing is transmitted.
    How accurate are Unix timestamps?
    Standard Unix timestamps (seconds) have 1-second precision. JavaScript millisecond timestamps have ~1ms precision. For sub-millisecond timing, use performance.now() (microsecond precision) or process.hrtime() in Node.js (nanosecond).
    What's epoch time vs Unix time?
    They're the same thing. 'Epoch time', 'Unix time', 'POSIX time', and 'seconds since epoch' all refer to seconds since 1 January 1970 UTC. The 'epoch' is the reference point (1970-01-01T00:00:00Z).

    Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.