All tools / Errors
X-Audit-Log-Reason header encoder
Percent-encode a moderation reason for the X-Audit-Log-Reason header and check the 512-character limit.
Result
URL-encoded UTF-8
Kick, ban, role, channel, and other moderation routes accept an X-Audit-Log-Reason header that becomes the audit log entry's reason. It takes 1–512 URL-encoded UTF-8 characters. Encode with encodeURIComponent so accents, emoji, and newlines survive the HTTP header.
Related: Role hierarchy check explainer · X-RateLimit header parser