All Tools View Categories About Contact Privacy

ARN Validator

Check an ARN's format — partition, account digits, region shape, and service naming — each reported individually.

Runs entirely in your browser — your ARN and account id never leave this page.

About ARN Validator

An ARN can be subtly wrong in ways that are easy to miss by eye: an account id with the wrong digit count, a region typed without its dashes, a partition misspelled as awz, a service field with an uppercase letter that snuck in from a copy-paste. ARN Validator runs a fixed set of format checks against a single ARN and reports exactly which ones pass and which fail, by name, instead of leaving you to eyeball a long colon-delimited string.

The checks run in two layers. The first is structural: does the string even have the shape of an ARN — does it start with the literal arn:, and does it have at least six colon-separated fields (partition, service, region, account, and a resource that may itself contain more colons)? If that much fails, validation stops there with a specific error, because nothing past that point can be meaningfully checked. If the basic shape holds, four further format checks run against the individual fields: the partition must be one of the three real AWS partitions (aws, aws-cn, or aws-us-gov) rather than a typo; the account id, if present, must be exactly twelve digits, since a shorter or longer number is never a real AWS account id; the region, if present, must match the general shape AWS region codes follow (two letters, an optional -gov, a hyphenated location name, and a trailing digit — us-east-1, ap-southeast-2, us-gov-west-1); and the service field must be lowercase letters, digits, and hyphens only, since AWS service identifiers in ARNs are always lowercase.

Two fields are deliberately allowed to be empty without being flagged: region and account. That is not a gap in the checks — it reflects real AWS behavior. S3 bucket ARNs and IAM ARNs both omit the region field entirely, and S3 additionally omits the account field, producing ARNs like arn:aws:s3:::my-bucket with two empty fields in a row. A validator that flagged those as errors would be wrong about how AWS ARNs actually work, so this one only flags a region or account that is present but malformed, never one that is simply absent where AWS allows it to be.

Every check that fails is reported individually and by name, not just as a single pass/fail bit — so a single result might read "account id '12345' must be empty or exactly 12 digits" while the region and service checks pass cleanly, telling you precisely what to fix rather than making you guess which of five possible things went wrong. When every check passes, the tool also shows the parsed field breakdown underneath, since a validator that only says "valid" without showing what it validated is harder to trust at a glance.

What this tool cannot tell you is whether the resource named by the ARN actually exists, whether you have permission to access it, or whether the account id belongs to a real AWS account — none of that is checkable without calling AWS, and this tool never does. It is a pure, local format check: useful for catching a mistyped ARN before it goes into a policy document, a CLI command, or a support ticket, with the ARN itself — which often contains a real account id — never leaving your browser.

Features

  • Structural checkarn: prefix and minimum six colon-separated fields.
  • Four format checks — partition, account digit-count, region shape, service character set.
  • Named, itemized errors — every failing check listed individually, not just pass/fail.
  • Correctly allows blank region/account for S3, IAM and similar services.
  • Parsed field breakdown shown alongside the result.
  • Copy result as JSON.
  • Sample ARNs (both a valid one and a deliberately broken one) and one-click clear.
  • 100% client-side — nothing is uploaded.

How to Use

  1. Paste an ARN into the input, or click a sample.
  2. Click Validate (or just stop typing — it checks live).
  3. Read the pass/fail summary at the top.
  4. Review each listed error if it fails, one per specific problem.
  5. Check the parsed fields shown underneath for a full breakdown either way.
  6. Copy the result as JSON if you need it elsewhere.

Examples

Example 1 — fully valid. arn:aws:iam::123456789012:role/my-role passes every check: real partition, no region (correctly allowed for IAM), 12-digit account, lowercase service.

Example 2 — bad account length. arn:aws:ec2:us-east-1:12345:instance/i-0abc123 fails one check: account id "12345" is not 12 digits — everything else passes.

Example 3 — bad region shape. arn:aws:ec2:useast1:123456789012:instance/i-0abc123 fails the region check — "useast1" is missing its hyphens.

Example 4 — bad partition. arn:awz:s3:::my-bucket fails with "Unrecognized partition \"awz\"".

Example 5 — correctly valid despite blank fields. arn:aws:s3:::my-bucket passes cleanly — the empty region and account are expected for S3, not flagged as errors.

Benefits

  • Catches typos before they reach a policy or script — wrong account length, malformed region, misspelled partition.
  • Explains exactly what is wrong, field by field, instead of a bare fail.
  • Understands real AWS exceptions — does not falsely flag S3/IAM's blank region and account.
  • Fast, local feedback loop while writing IaC or policy documents by hand.
  • Copy-ready JSON output for logging or tickets.
  • Private — account IDs never leave your browser.

Frequently Asked Questions

What exactly counts as "valid" here?
Two layers. First, the ARN must have the minimum shape of an ARN at all: start with <code>arn:</code> and have at least six colon-separated fields. Second, on top of that shape, four format checks run: the partition must be <code>aws</code>, <code>aws-cn</code> or <code>aws-us-gov</code>; the account id must be empty or exactly 12 digits; the region, if present, must match the pattern of a real AWS region code; and the service field must be lowercase letters, digits and hyphens. An ARN passes only if both layers pass.
Does it check that the service or resource actually exists in AWS?
No. This is a format validator, not a live lookup — it has no way to know whether <code>arn:aws:s3:::a-bucket-that-does-not-exist</code> corresponds to a real bucket, and it does not call AWS to find out. It only checks that the ARN is shaped the way a real ARN should be.
Why is an empty region or account sometimes still valid?
Because several real AWS services legitimately leave those fields blank — S3 and IAM omit region, and S3 also omits account. The validator treats an empty region/account as valid by design; it only flags an account id that is present but not exactly 12 digits, or a region that is present but does not look like a real region code.
What checks does it run, exactly, in order?
Parse first (fails fast with a specific error if the basic <code>arn:partition:service:region:account:resource</code> shape is missing), then: partition membership, account digit-count, region shape, and service character set. Every failing check is listed individually rather than stopping at the first one, so you see everything wrong in one pass.
Can I validate more than one ARN at a time?
This tool checks one ARN per run, with the full explanation of every check. For a table of many ARNs with pass/fail per row, use the Bulk ARN Parser, which parses many lines at once (parsing implies the same minimum-shape check this validator starts with).
What does a passing result actually tell me?
That the ARN is well-formed by AWS's general ARN grammar and by the four format rules above — not that the resource exists, that you have access to it, or that the account id belongs to a real AWS account.
Can I copy the validation result?
Yes — a Copy as JSON button copies the full result (valid/invalid, the list of errors, and the parsed fields) once you run a check.
Is the ARN I paste in sent anywhere?
No. Validation runs entirely in your browser — useful since ARNs frequently contain a real AWS account id.