New live demo

Sam Ruby Sam Ruby on January 19, 2021

Check it out here.

Because the conversion from Ruby to JavaScript is fast and runs right in your browser, this demo will update the converted output keystroke-by-keystroke as you enter your code. Find and fix your syntax errors, select the right filters and options, and ensure the JavaScript to be generated is what you intend before you commit your code.

Or just use it to learn idiomatic equivalents to common Ruby language patterns. Just be sure to select a modern eslevel, and liberally add filters, particularly filter functions.

Under the covers, it is running the same ruby2js code, just converted from Ruby to JavaScript using the excellent Opal converter.

See a conversion that either isn’t quite right or isn’t the best it can be? Let us know!

Why Opal? Because it is the right tool for this job.


Ready to Give Ruby2JS a Try?