ISO datetime regex pattern
Copy and test a JavaScript regex for ISO datetime strings, with examples, limitations, and a one-click link to the regex tester.
ISO datetime regex pattern
Validate whole value
Use anchors to check whether the complete value matches.
Regex: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$
Flags: -
Search in text
Find matching fragments inside a larger block of text.
Regex: \b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})\b
Flags: g
Examples that match
2026-05-15T14:30:00Z2026-05-15T14:30+01:00
Examples that do not match
2026-05-15 14:3015-05-2026T14:30:00Z
Limitations
This pattern matches common ISO datetime shapes but does not prove that the timestamp is a valid calendar moment.
Tools in this category
- Base64 encoder / decoder
- Color contrast checker
- Color palette generator
- Configuration file converter
- Docker Compose analyzer
- Dockerfile analyzer
- Hash generator
- JSON Converter
- JSON formatter
- JWT encoder / decoder
- Number base converter
- Password generator
- Regex inspector
- Regex pattern library
- URL encoder / decoder
- UUID generator