Skip to main content
AllDevToolsHub
Back to all patterns

AWS Account ID

Web & Network

Validates a 12-digit AWS account ID.

/^[0-9]{12}$/

How it works

AWS account IDs are 12-digit numbers, often shown with no separators in ARNs. Always store as strings, leading zeros are significant.

Test Cases

Should Match

  • 123456789012
  • 000000000001

Should NOT Match

  • 12345678901
  • 1234567890123
  • 12-345-678-9012

Quick Summary

Matches a 12-digit AWS account ID.