JSON timestamp converter

Convert one timestamp field across a JSON log. Use JSON Lines for one object per line, or JSON for a single object or an array of records.

Source and conversion settings

Up to 1 MiB of UTF-8 and 1,000 records. Your log stays in this browser.

Enter a key like timestamp or a nested path like /event/time. Leave the records path empty for a top-level object or array.

Enable JavaScript to convert the log on this device.

Choose the field and unit

Use a field name such as @timestamp or a path such as /event/time. If a JSON array sits inside an object, enter its path in Records path. Use ~1 for a slash and ~0 for a tilde inside a path key. JSON Pointer syntax

Choose the input unit from your source format. Automatic detection uses the digit count, so choose the unit explicitly for short values near 1970. When converting an ISO date to Unix time, include seconds and a UTC offset such as Z or +05:30.

Download the converted log to replace the chosen field. Other fields, line breaks and records with conversion errors stay as written. ISO dates and Unix results are saved as JSON strings to keep their full precision.

Download the separate report for the original values, conversions and any errors. It uses record numbers for JSON arrays and physical line numbers for JSON Lines. Use the CSV timestamp converter if your log is already in a spreadsheet, or the logfmt converter for key=value lines.

Use the MongoDB ObjectId converter to read the creation time from an _id value containing an ObjectId.

Related Tools

More free tools for developers debugging timestamps, schedules, and text changes.