Loading
BDTools
Indent your BDFD code to make it more readable and organized. Paste your code below, and click "Indent Code" to format it.
This section explains the two key indentation settings used in this tool:
Indent Size is the number of spaces added between nested control statements such as $if, $async, or $try. Each nested block is indented further by this many spaces to visually separate different logic levels.
Indent Depth defines how much deeper the content inside a control block is indented relative to its parent statement. This keeps the content slightly nested but prevents excessive spacing.
For example, with Indent Size = 2 and Indent Depth = 1:
$if[condition] <- Control statement at 0 spaces
Hello <- Content indented 1 space inside $if
$if[condition2] <- Nested control indented by 2 spaces
Hi <- Content inside nested block indented 3 spaces (2 + 1)
$endif <- Close nested block at 2 spaces
$endif <- Close outer block at 0 spaces
This logic applies consistently to all control blocks including $async, $try, and $jsonParse (which uses JSON pretty-printing for its contents).
Indenting is the process of organizing your BDFD code by adding line breaks and spaces to visually separate blocks, functions, and commands. This makes your code easier to read, debug, and maintain by clearly showing its structure.
Proper indentation helps you quickly spot nested commands and understand the logic flow — especially useful in complex function chains or long scripts.
This tool helps by automatically:
Example:
$nomention
$if[1>2]
Hi!
$elseif[2>1]
Hi!
$endif
Use this tool to keep your scripts clean, structured, and easier to scale as your project grows. Clear code = fewer bugs and easier troubleshooting.
Need more help or want to dive deeper into BDFD scripting? Visit the official BDFD documentation.
Note: This is a community-made tool and is not affiliated with BDFD directly.