Home › Developer Tools › Date Format Converter

Date Format Converter

Paste a date in almost any format (ISO 8601, RFC 2822, Unix seconds or milliseconds, 10/20/2026, 20 Oct 2026 2:05 pm…) and see it in every standard format at once. Build your own pattern in strftime, moment.js/Day.js or Java syntax and translate it between the three.

Last updated:

Try:

Standard formats

Format builder

    Token reference (click a token to insert it)

    TokenMeaningExample
    Advertisement
    Advertisement

    How to use the Date Format Converter

    1. Enter a date in any common format, or click Now. A Unix timestamp works too.
    2. Set the time zones: which zone a date without an offset is in, and which zone to show results in.
    3. Copy a standard format such as ISO 8601 or RFC 2822 from the results table.
    4. Build a custom format: pick strftime, moment.js or Java, choose a preset or type a pattern, and click tokens in the reference to insert them.
    5. Translate the pattern: the equivalent strftime, moment and Java patterns are shown below the result.

    Same format, three syntaxes

    The most common patterns side by side. The format builder above translates any pattern automatically.

    Output examplestrftime (Python, PHP, C)moment.js / Day.jsJava DateTimeFormatter
    2026-10-20%Y-%m-%dYYYY-MM-DDyyyy-MM-dd
    2026-10-20 14:05:09%Y-%m-%d %H:%M:%SYYYY-MM-DD HH:mm:ssyyyy-MM-dd HH:mm:ss
    2026-10-20T14:05:09.123+02:00%Y-%m-%dT%H:%M:%S.%f%:z *YYYY-MM-DD[T]HH:mm:ss.SSSZyyyy-MM-dd'T'HH:mm:ss.SSSXXX
    10/20/2026%m/%d/%YMM/DD/YYYYMM/dd/yyyy
    20.10.2026%d.%m.%YDD.MM.YYYYdd.MM.yyyy
    Tuesday, October 20, 2026%A, %B %-d, %Ydddd, MMMM D, YYYYEEEE, MMMM d, yyyy
    Oct 20, 2026 2:05 PM%b %-d, %Y %-I:%M %pMMM D, YYYY h:mm AMMM d, yyyy h:mm a
    Tue, 20 Oct 2026 14:05:09 +0200%a, %d %b %Y %H:%M:%S %zddd, DD MMM YYYY HH:mm:ss ZZEEE, dd MMM yyyy HH:mm:ss xx
    2026-W43%G-W%VGGGG-[W]WWYYYY-'W'ww

    * %f prints microseconds (6 digits) in Python; trim to milliseconds yourself, or use isoformat(timespec="milliseconds").

    Classic date formatting bugs

    • Week year instead of calendar year: Java YYYY and moment GGGG give the ISO week-based year. On December 29–31 and January 1–3 it can differ from the calendar year by one.
    • Day of year instead of day of month: Java DD and moment DDDD give 293 for October 20.
    • Minutes instead of months: mm (moment, Java) and %M (strftime) are minutes; months are MM and %m.
    • Weekday instead of day: moment d/dd is the weekday; the day of the month is D/DD.
    • 12-hour clock without AM/PM: hh or %I alone makes 1 am and 1 pm identical. Add A, a or %p.
    • Missing time zone: a timestamp like 2026-10-20 14:05 means a different instant in every zone. Store and exchange UTC or include the offset (ISO 8601 / RFC 3339).

    Unix timestamps by digit count

    Digits (today)UnitTypical source
    10SecondsUnix date +%s, PHP time(), Python int(time.time()), JWT exp
    13MillisecondsJavaScript Date.now(), Java System.currentTimeMillis()
    16MicrosecondsPostgreSQL internals, Python time.time_ns() // 1000
    19NanosecondsGo time.Now().UnixNano(), InfluxDB

    Frequently asked questions

    What is the ISO 8601 date format?

    ISO 8601 writes dates from largest to smallest unit: YYYY-MM-DD, optionally followed by T, the time hh:mm:ss, fractional seconds and a time zone designator such as Z (UTC) or +02:00, for example 2026-10-20T14:05:09+02:00. It sorts correctly as text and is the safest format for APIs and files.

    What is the difference between ISO 8601 and RFC 3339?

    RFC 3339 is a stricter profile of ISO 8601 for internet protocols. It always requires a full date, time and offset, and allows a space instead of T. ISO 8601 also allows week dates, ordinal dates, reduced precision and basic format without separators.

    What is the RFC 2822 date format?

    It is the date format used in email headers, for example Tue, 20 Oct 2026 14:05:09 +0200: optional weekday, day, English month abbreviation, year, 24-hour time and a numeric offset. HTTP headers use a variant fixed to GMT: Tue, 20 Oct 2026 12:05:09 GMT.

    Why does my Java date show the wrong year at the end of December?

    In Java DateTimeFormatter and SimpleDateFormat, YYYY is the week-based year, which can differ from the calendar year in the last days of December and the first days of January. Use yyyy (or uuuu) for the calendar year. Likewise DD is the day of the year; use dd for the day of the month.

    How do I tell if a Unix timestamp is in seconds or milliseconds?

    Current timestamps in seconds have 10 digits (for example 1792500000), in milliseconds 13 digits, in microseconds 16 and in nanoseconds 19. The converter detects the unit from the number of digits automatically.

    Is 03/04/2026 March 4 or April 3?

    It depends on the locale: the US reads month/day (March 4), most of Europe and many other countries read day/month (April 3). Choose the order in the settings. If one number is above 12 the order is detected automatically, and ISO 8601 (2026-03-04) avoids the ambiguity entirely.

    Is my data sent anywhere?

    No. Parsing, time zone conversion and formatting use your browser's built-in Intl APIs and run entirely on your device.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Unix Timestamp ConverterConvert epoch timestamps to dates and back.Time Zone ConverterCompare time zones and plan meetings.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.Regex TesterTest and debug regular expressions live.Extract Dates from TextFind every date in text, in any common format, and convert them all to one format you choose.Today's DateWhat is today's date? Live date in every format: ISO, US/EU, week number, Unix, Hijri, Hebrew.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.JSON to CSVConvert JSON data to CSV for spreadsheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.Markdown to HTMLConvert Markdown to clean HTML with a live editor.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.HTML to Markdown ConverterTurn HTML or pasted rich text into clean Markdown with tables and live preview.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to Excel ConverterConvert CSV files to a real .xlsx workbook with typed numbers and dates, one sheet per file.CSV SplitterSplit a large CSV into smaller files by row count, file count or column value, header kept.CSV MergerCombine many CSV files into one, matching columns by name, with dedupe and a source column.VCF to CSV ConverterConvert vCard (.vcf) contacts to CSV for Google or Outlook, or turn a CSV back into a VCF.Calendar Event (.ics) GeneratorCreate an .ics calendar invite with time zone, reminders and repeats + Google/Outlook links.CSV Column ExtractorPick, reorder and rename CSV columns, filter rows by value, and export a new CSV or JSON.CSV Diff CheckerCompare two CSV files by key column and see added, removed and changed rows cell by cell.CSV Duplicate Row RemoverRemove duplicate rows from a CSV by all or selected columns and download the cleaned file.CSV to HTML TableTurn CSV into clean HTML table code with a live preview, styling options and one-click copy.CSV to Markdown TableConvert CSV to a neatly aligned GitHub Markdown table with column alignment and live preview.CSV TransposeSwap rows and columns of CSV, TSV or pasted spreadsheet data, with delimiter auto-detect.ENV to JSON ConverterConvert .env files to JSON or YAML and JSON back to .env, with quotes and multiline values.File to Base64Convert any file to a Base64 string or data URI with MIME detection, line wrap and download.HTML Table to CSVExtract any table from HTML or page source to CSV, TSV or JSON, with colspan and rowspan handled.IEEE 754 Floating Point ConverterConvert decimals to 32/64-bit IEEE 754 floats: toggle bits, see hex, exact value and rounding error.INI to JSON ConverterConvert INI and CFG files to JSON and JSON back to INI, with sections, arrays and types.IP Address ConverterConvert IPv4 to decimal, hex, binary, octal and back, with class and private/public check.ISBN Converter & ValidatorConvert ISBN-10 to ISBN-13 and back, validate check digits and hyphenate, one or in bulk.JSON Flatten / UnflattenFlatten nested JSON to dot or bracket path keys, or unflatten flat keys back to nested JSON.JSON to Dart ClassTurn JSON into Dart model classes with fromJson, toJson, null safety and nested classes.JSON to Java ClassTurn JSON into Java POJOs or records with Lombok, getters/setters and Jackson or Gson annotations.JSON to Kotlin Data ClassTurn JSON into Kotlin data classes for kotlinx.serialization, Gson, Moshi or Jackson.JSON to Markdown TableTurn a JSON array of objects into a GitHub Markdown table with column picker and alignment.JSON to PHP ArrayConvert JSON to PHP array code (short [] or array()) and PHP arrays back to JSON.JSON to Rust StructTurn JSON into Rust structs with serde derives, rename attributes, Option and Vec types.JSON to SQL ConverterConvert a JSON array of objects to CREATE TABLE and INSERT statements for MySQL, Postgres, SQLite.JSON to Swift StructTurn JSON into Swift Codable structs with CodingKeys, optionals and nested types.JSON to TOML ConverterConvert JSON to clean TOML with tables, arrays of tables, inline tables and dates.JSONL to JSON ConverterConvert JSON Lines / NDJSON to a JSON array and back, with line-level error reports.Properties to YAML ConverterConvert Java .properties to nested YAML (application.yml) and YAML back to properties.
    See all 129 Data & File Format Converters →