Convert a date to and from a unix timestamp and view the date in different formats (ISO 8601, RFC 3339, RFC 822/2822). You can also format the date in a custom format using the date-fns library patterns.
Format | Result | |
---|---|---|
ISO 8601, RFC 3339 | 2025-01-27T10:21:41.808+00:00 date-fns format: yyyy-MM-dd'T'HH:mm:ss.SSSxxx | |
RFC 822/2822 | Mon, 27 Jan 2025 10:21:41 +0000 date-fns format: EEE, dd MMM yyyy HH:mm:ss xx | |
Unix timestamp (s) | 1737973301 date-fns format: t | |
Unix timestamp (ms) | 1737973301808 date-fns format: T |
Mockoon is a powerful API mocking tool that makes it easy to create and manage mock APIs for prototyping and testing. With an intuitive interface, you can quickly set up mock servers, customize responses, and simulate scenarios in real-time, enhancing team collaboration and speeding up development.
This tool allows you to convert a date to a unix timestamp (seconds or milliseconds) and vice versa, and view the date in different formats (ISO 8601, RFC 3339, RFC 822/2822). You can also format the date in a custom format using the date-fns library format.
A Unix timestamp (or epoch time) is the number of seconds or milliseconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970. It is used in many programming languages and systems to represent dates and times.
Unix timestamps are often used in APIs to represent dates and times because they are easy to work with and can be converted to any time zone.
date-fns is a modern JavaScript date utility library that provides comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser or Node.js environment.
It is used in this tool to format dates and unix timestamps in different formats using predefined patterns. You can find the list of available patterns in the date-fns documentation.