Be sure to visit my Mod Page too.

Morrowind Script Indenter
(works with Oblivion scripts too)
by ManaUser
Options: (Presets: Official Forum, Editor)
Use spaces.
Use tabs.
Extra large first level.
Add CODE Tags.

So what does this do? It formats scripts to make them more readable. For example, it would turn this:
begin GiveBonus

if ( GlobalVar == 0 )
set GlobalVar to 1
if ( Player->GetLevel >= 15 )
Player->AddSpell "Bonus3"
elseif ( Player->GetLevel <= 5 )
Player->AddSpell "Bonus1"
else
Player->AddSpell "Bonus2"
endif
else
set GlobalVar to 2
endif
StopScript GiveBonus

end
Into this:
begin GiveBonus

    if ( GlobalVar == 0 )
        set GlobalVar to 1
        if ( Player->GetLevel >= 15 )
            Player->AddSpell "Bonus3"
        elseif ( Player->GetLevel <= 5 )
            Player->AddSpell "Bonus1"
        else
            Player->AddSpell "Bonus2"
        endif
    else
        set GlobalVar to 2
    endif
    StopScript GiveBonus

end
Just paste your script into the box, adjust the options as needed click Indent Now, and copy your script back out.

Do you see ;ERR in your script? That means you have more close block commands than open block commands. For example too many endifs. Likewise if the last line of your script is indented, you have more close blocks than open blocks, just the opposite problem.

Tip: You can use CTRL+C and CTRL+V to copy and paste in the editor.

Want to use Morrowind Script Indenter offline? Just press CTRL+S to save this page on your computer.

If you use Firefox, you might also want to check out Yacoby's adaptation of my code here as a Fixefox Extension. It lets to indent scripts in your forum posts directly with a right-click context menu.

* Thanks to Dave Humphrey for tweaking the code to work in more browsers.