
Unix Timestamp Converter API
Development
Convert between human-readable dates and Unix timestamps instantly. Supports both seconds and milliseconds formats for developers and system administrators.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
100 requests per minute
Endpoints
1 endpoint available
Overview
The Unix Timestamp Converter API converts between human-readable dates and Unix timestamps. Supports both seconds (10 digits) and milliseconds (13 digits) formats with automatic detection.
Conversion Types
- Date to Timestamp - Convert human-readable date/time to Unix timestamp
- Timestamp to Date - Convert Unix timestamp to human-readable date/time
Supported Formats
For date-to-timestamp conversion, the API accepts:
- ISO 8601:
2024-12-25T15:30:00 - Date and time:
2024-12-25 15:30:00 - Date only:
2024-12-25(assumes 00:00:00)
For timestamp-to-date conversion:
- Milliseconds (13 digits):
1703517000000 - Seconds (10 digits):
1703517000
Use Cases
- Log analysis and debugging
- Database timestamp handling
- API date parameter conversion
- Cross-system time synchronization
Endpoints
POST
/v1/tools/unix-timestamp-converterConvert between dates and Unix timestamps
Request Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| datetime | string | Optional | Human-readable date/time to convert to timestamp (provide this OR timestamp) |
| timestamp | number | Optional | Unix timestamp to convert to date (seconds or milliseconds) |
Response Example
{
"success": true,
"result": {
"timestamp": 1703517000000,
"datetime": "12/25/2024, 3:30:00 PM",
"iso": "2024-12-25T15:30:00.000Z",
"format": "milliseconds"
}
}Error Codes
400
Invalid request body or no input provided401
Missing or invalid API key422
Invalid date or timestamp format429
Rate limit exceeded500
Internal server errorCode Examples
# Convert date to timestamp
curl -X POST https://api.opentools.ca/v1/tools/unix-timestamp-converter \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"datetime": "2024-12-25T15:30:00"}'
# Convert timestamp to date
curl -X POST https://api.opentools.ca/v1/tools/unix-timestamp-converter \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"timestamp": 1703517000000}'