Some workflows need an IAM policy document as a single compact line rather than a nicely indented block — pasting into an AWS CLI --policy-document flag, embedding inside a Terraform heredoc string, or setting it as a Lambda/CI environment variable where multi-line values are awkward. IAM Policy Minifier takes a pasted policy document and strips every non-significant character of whitespace, producing the exact same JSON on a single line.
Like the companion Beautifier tool, minifying only requires valid JSON — it does not require the document to already be a structurally complete IAM policy. If the JSON parses but the shape looks incomplete (missing Version, no Statement, and similar) the tool still minifies it and shows a separate structural warning alongside the result, rather than blocking you from getting the compact output.
A size-reduction panel shows the original character count, the minified character count, and the percentage saved — useful context, though worth knowing that AWS itself measures policy size against its character-count quotas with whitespace already excluded, so minifying does not change how much of your size quota a policy consumes; it only changes how compact the text is to paste around.