Report

Help us improve this tool

MongoDB ObjectId Validator

Check whether a string is a valid 24-character hexadecimal MongoDB ObjectId before using it in queries.

O M T

Validate MongoDB ObjectId strings before you query

Quickly check whether an identifier is a well-formed 24-character hexadecimal MongoDB ObjectId. Invalid IDs are a common source of query errors in Mongoose, the MongoDB shell, and aggregation pipelines.

After validation, convert valid IDs with the MongoDB ObjectId to Timestamp Converter.

Frequently Asked Questions

What makes an ObjectId valid?

It must be exactly 24 hexadecimal characters and satisfy BSON ObjectId parsing rules.

Can I paste multiple IDs?

The validator evaluates the first whitespace-separated token so you can paste lines from logs or CSV exports.

Is data sent to a server?

No. Validation runs in your browser.