www.cleancss.com
Open in
urlscan Pro
34.228.119.37
Public Scan
Submitted URL: http://jspretty.com/
Effective URL: https://www.cleancss.com/javascript-beautify/
Submission: On November 16 via api from US — Scanned from US
Effective URL: https://www.cleancss.com/javascript-beautify/
Submission: On November 16 via api from US — Scanned from US
Form analysis
1 forms found in the DOM<form>
<div class="col-sm-12">
<div class="form-group">
<textarea class="form-control" name="code" id="code" rows="40" placeholder="Enter the Javascript you want to Beautify..." style="font-size: 10px; width: 100%; display: none;"></textarea>
<div class="CodeMirror cm-s-default CodeMirror-empty" style="height: 600px;">
<div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0"
style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div>
<div class="CodeMirror-hscrollbar" style="left: 29px; display: block; right: 0px; min-height: 18px;">
<div style="height: 100%; min-height: 1px; width: 713px;"></div>
</div>
<div class="CodeMirror-vscrollbar" style="min-width: 18px;">
<div style="min-width: 1px; height: 0px;"></div>
</div>
<div class="CodeMirror-scrollbar-filler"></div>
<div class="CodeMirror-gutter-filler"></div>
<div class="CodeMirror-scroll" tabindex="-1">
<div class="CodeMirror-sizer" style="margin-left: 29px; min-width: 7px; min-height: 22px;">
<div style="position: relative; top: 0px;">
<div class="CodeMirror-lines">
<div style="position: relative; outline: none;">
<pre class="CodeMirror-placeholder" style="height: 0px; overflow: visible;">Enter the Javascript you want to Beautify...</pre>
<div class="CodeMirror-measure">
<div class="CodeMirror-linenumber CodeMirror-gutter-elt">
<div>1</div>
</div>
</div>
<div class="CodeMirror-measure"></div>
<div style="position: relative; z-index: 1;"></div>
<div class="CodeMirror-cursors">
<div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 14px;"> </div>
</div>
<div class="CodeMirror-code">
<div style="position: relative;">
<div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;">
<div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div>
</div>
<pre class=""><span style="padding-right: 0.1px;"><span></span></span></pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="position: absolute; height: 30px; width: 1px; top: 22px;"></div>
<div class="CodeMirror-gutters" style="height: 598px;">
<div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div>
</div>
</div>
</div>
</div>
<!--<script>
$( document ).ready(function() {
$("#capimage").error(function(){$(this).hide(); $('#captxt').hide(); $('#captxt').val('hide'); });
$("#capimage").load(function(){ $('#captxt').show(); });
$('#cap').click(function(event) {
if ($('#captxt').val() == '') {
alert('Please enter the captcha');
return false;
}
var img = $("<img />").attr('src', 'http://www.insurancexdate.com/cgi-bin/nydata.pl?cap='+$('#captxt').val())
$('capimg').append(img);
$('#captxt').hide(); $('#captxt').val('hide');$('#capimage').hide();
});
$('#captxt').keypress(function (e) {
var key = e.which;
if(key == 13) // the enter key code
{
$('#cap').click();
beautify();
return false;
}
});
});
</script>
-->
<!--
<img id="capimage" src="http://www.insurancexdate.com/cgi-bin/nydata.pl" style="margin:5px;">
<br/>
<input id="captxt" style="display:none;margin:5px;text-transform: uppercase" type="text" name="cap" placeholder="Enter the image above">
<div id="capimg" style="display:none;"></div>
<br />-->
<br>
<a id="cap" href="javascript:beautify();" class="ui primary button listen">Format Code</a>
</div>
<h4>Options:</h4>
<div class="ui form">
<div class="inline fields">
<div class="field">
<div class="ui select dropdown options selection" tabindex="0"><select name="tabsize" id="tabsize">
<option value="1">Indent with a tab character</option>
<option value="2">Indent with 2 spaces</option>
<option value="3">Indent with 3 spaces</option>
<option value="4">Indent with 4 spaces</option>
<option value="8">Indent with 8 spaces</option>
</select><i class="dropdown icon"></i>
<div class="text">Indent with a tab character</div>
<div class="menu" tabindex="-1">
<div class="item active selected" data-value="1" data-text="Indent with a tab character">Indent with a tab character</div>
<div class="item" data-value="2" data-text="Indent with 2 spaces">Indent with 2 spaces</div>
<div class="item" data-value="3" data-text="Indent with 3 spaces">Indent with 3 spaces</div>
<div class="item" data-value="4" data-text="Indent with 4 spaces">Indent with 4 spaces</div>
<div class="item" data-value="8" data-text="Indent with 8 spaces">Indent with 8 spaces</div>
</div>
</div>
</div>
<div class="field">
<div class="ui select dropdown options selection" tabindex="0"><select name="max-preserve-newlines" id="max-preserve-newlines">
<option value="-1">Remove all extra newlines</option>
<option value="1">Allow 1 newline between tokens</option>
<option value="2">Allow 2 newlines between tokens</option>
<option value="5">Allow 5 newlines between tokens</option>
<option value="10">Allow 10 newlines between tokens</option>
<option value="0">Allow unlimited newlines between tokens</option>
</select><i class="dropdown icon"></i>
<div class="text">Remove all extra newlines</div>
<div class="menu" tabindex="-1">
<div class="item active selected" data-value="-1" data-text="Remove all extra newlines">Remove all extra newlines</div>
<div class="item" data-value="1" data-text="Allow 1 newline between tokens">Allow 1 newline between tokens</div>
<div class="item" data-value="2" data-text="Allow 2 newlines between tokens">Allow 2 newlines between tokens</div>
<div class="item" data-value="5" data-text="Allow 5 newlines between tokens">Allow 5 newlines between tokens</div>
<div class="item" data-value="10" data-text="Allow 10 newlines between tokens">Allow 10 newlines between tokens</div>
<div class="item" data-value="0" data-text="Allow unlimited newlines between tokens">Allow unlimited newlines between tokens</div>
</div>
</div>
</div>
<div class="field">
<div class="ui select dropdown options selection" tabindex="0"><select name="wrap-line-length" id="wrap-line-length">
<option value="0">Do not wrap lines</option>
<option value="40">Wrap lines near 40 characters</option>
<option value="70">Wrap lines near 70 characters</option>
<option value="80">Wrap lines near 80 characters</option>
<option value="110">Wrap lines near 110 characters</option>
<option value="120">Wrap lines near 120 characters</option>
<option value="160">Wrap lines near 160 characters</option>
</select><i class="dropdown icon"></i>
<div class="text">Do not wrap lines</div>
<div class="menu" tabindex="-1">
<div class="item active selected" data-value="0" data-text="Do not wrap lines">Do not wrap lines</div>
<div class="item" data-value="40" data-text="Wrap lines near 40 characters">Wrap lines near 40 characters</div>
<div class="item" data-value="70" data-text="Wrap lines near 70 characters">Wrap lines near 70 characters</div>
<div class="item" data-value="80" data-text="Wrap lines near 80 characters">Wrap lines near 80 characters</div>
<div class="item" data-value="110" data-text="Wrap lines near 110 characters">Wrap lines near 110 characters</div>
<div class="item" data-value="120" data-text="Wrap lines near 120 characters">Wrap lines near 120 characters</div>
<div class="item" data-value="160" data-text="Wrap lines near 160 characters">Wrap lines near 160 characters</div>
</div>
</div>
</div>
<div class="field">
<div class="ui select dropdown options selection" tabindex="0"><select id="brace-style">
<option value="collapse">Braces with control statement</option>
<option value="expand">Braces on own line</option>
<option value="end-expand">End braces on own line</option>
</select><i class="dropdown icon"></i>
<div class="text">Braces with control statement</div>
<div class="menu" tabindex="-1">
<div class="item active selected" data-value="collapse" data-text="Braces with control statement">Braces with control statement</div>
<div class="item" data-value="expand" data-text="Braces on own line">Braces on own line</div>
<div class="item" data-value="end-expand" data-text="End braces on own line">End braces on own line</div>
</div>
</div>
</div>
</div>
<div class="field">
<h4>HTML <style>, <script> formatting:</h4>
</div>
<div class="field">
<div class="ui select dropdown options selection" tabindex="0"><select id="indent-scripts">
<option value="keep">Keep indent level of the tag</option>
<option value="normal">Add one indent level</option>
<option value="separate">Separate indentation</option>
</select><i class="dropdown icon"></i>
<div class="text">Keep indent level of the tag</div>
<div class="menu" tabindex="-1">
<div class="item active selected" data-value="keep" data-text="Keep indent level of the tag">Keep indent level of the tag</div>
<div class="item" data-value="normal" data-text="Add one indent level">Add one indent level</div>
<div class="item" data-value="separate" data-text="Separate indentation">Separate indentation</div>
</div>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="end-with-newline" tabindex="0" class="hidden"> <label>End script and style with newline?</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="detect-packers" tabindex="0" class="hidden"> <label>Detect packers and obfuscators?</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="keep-array-indentation" tabindex="0" class="hidden"> <label>Keep array indentation?</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="break-chained-methods" tabindex="0" class="hidden"> <label>Break lines on chained methods?</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="space-before-conditional" tabindex="0" class="hidden"> <label>Space before conditional: "if(x)" / "if (x)"</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="unescape-strings" tabindex="0" class="hidden"> <label>Unescape printable chars encoded as \xNN or \uNNNN?</label>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" id="jslint-happy" tabindex="0" class="hidden"> <label>Use JSLint-happy formatting tweaks?</label>
</div>
</div>
</div>
</form>
Text Content
DT Dan's Tools Web Dev HTML/JS/CSS Playground HTML Color Codes CSS Fonts Online Diff Tool HEX to RGB Color Converter .htaccess Generator RegEx Testing RegEx Pal RGB & HEX Color Explorer RGB to HEX Color Converter Spritegen v1 Epoch & Unix Timestamp Conversion Tools Website Speed Test Conversion Data CSV To HTML Converter CSV To JSON Converter CSV To TSV Converter CSV To XML Converter JSON To CSV Converter JSON To HTML Converter JSON To TSV Converter JSON To XML Converter XML To CSV Converter XML To HTML Converter XML To JSON Converter XML To TSV Converter Convert Files Numbers Binary Converter Binary To Decimal Converter Binary To Hex Converter Binary To Octal Converter Unit Converter Decimal To Binary Converter Decimal To Hex Converter Decimal To Octal Converter Hex To Binary Converter Hex To Decimal Converter Hex To Octal Converter Data Size Converter Octal To Binary Converter Octal To Decimal Converter Octal To Hex Converter Strings Binary To String Converter Hex To String Converter HTML Entities Escape HTML Entities Unescape String To Binary Converter String To Hex Converter Strip and Remove HTML Tags Strip and Remove XML Tags Word Counter XML Entities Escape XML Entities Unescape Encoders / Decoders Base64 Decode Base64 Encode MD5 Hash Generator SHA-1 Hash Generator SHA-256 Hash Generator SHA-512 Hash Generator URL Encode/Decode Formatters CSS Formatter GO Formatter HTML Beautifier & Formatter Javascript Formatter Javascript Obfuscate JSON Formatter & Beautifier JSON Editor JSON Validator Perl Formatter PHP Formatter Python Formatter Ruby Formatter SQL Formatter XML Formatter & Beautifier Internet Email Validator Is It Up Or Down Default Router Settings User Manuals What is my IP English Afrikaans Albanian Amharic Arabic Armenian Azerbaijani Bengali Bosnian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dari Dutch English Estonian Farsi (Persian) Filipino Tagalog Finnish French French (Canada) Georgian German Greek Gujarati Haitian Creole Hausa Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Kannada Kazakh Korean Latvian Lithuanian Macedonian Malay Malayalam Maltese Mongolian Norwegian Persian Pashto Polish Portuguese Romanian Russian Serbian Sinhala Slovak Slovenian Somali Spanish Spanish (Mexico) Swahili Swedish Tagalog Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh JAVASCRIPT VIEWER, BEAUTIFIER AND FORMATTER, EDITOR RELATED TOOLS Javascript Minify Javascript Obfuscate Css Beautify Html Beautify Php Beautify Enter the Javascript you want to Beautify... 1 1 Format Code OPTIONS: Indent with a tab character Indent with 2 spaces Indent with 3 spaces Indent with 4 spaces Indent with 8 spaces Indent with a tab character Indent with a tab character Indent with 2 spaces Indent with 3 spaces Indent with 4 spaces Indent with 8 spaces Remove all extra newlines Allow 1 newline between tokens Allow 2 newlines between tokens Allow 5 newlines between tokens Allow 10 newlines between tokens Allow unlimited newlines between tokens Remove all extra newlines Remove all extra newlines Allow 1 newline between tokens Allow 2 newlines between tokens Allow 5 newlines between tokens Allow 10 newlines between tokens Allow unlimited newlines between tokens Do not wrap lines Wrap lines near 40 characters Wrap lines near 70 characters Wrap lines near 80 characters Wrap lines near 110 characters Wrap lines near 120 characters Wrap lines near 160 characters Do not wrap lines Do not wrap lines Wrap lines near 40 characters Wrap lines near 70 characters Wrap lines near 80 characters Wrap lines near 110 characters Wrap lines near 120 characters Wrap lines near 160 characters Braces with control statement Braces on own line End braces on own line Braces with control statement Braces with control statement Braces on own line End braces on own line HTML <STYLE>, <SCRIPT> FORMATTING: Keep indent level of the tag Add one indent level Separate indentation Keep indent level of the tag Keep indent level of the tag Add one indent level Separate indentation End script and style with newline? Detect packers and obfuscators? Keep array indentation? Break lines on chained methods? Space before conditional: "if(x)" / "if (x)" Unescape printable chars encoded as \xNN or \uNNNN? Use JSLint-happy formatting tweaks? Enter your messy, minified, or obfuscated Javascript (JS) into the field above to have it cleaned up and made pretty. The editor above also contains helpful line numbers and syntax highlighting. There are many option to tailor the beautifier to your personal formatting tastes. WHEN DO YOU USE JAVASCRIPT VIEWER, BEAUTIFIER AND FORMATTER, EDITOR Often when writing Javascript (JS) your indentation, spacing, and other formatting can become a bit disorganized. It is also common for multiple developers to work on a single project who have different formatting techniques. This tool is helpful for making the formatting of a file consistent. It is also common for Javascript (JS) to be minified or obfuscated. You can use this tool to make that code look pretty and readable so it is easier to edit. EXAMPLES The minified Javascript (JS) below: function j(e) {var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)} Becomes this beautified Javascript (JS): function j(e) { var t = e.length, n = x.type(e); return x.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e) } DANSTOOLS.COM Contact About © 2014 - 2024 Dan's Tools Contact Us Privacy Policy