HTML / ERB to Slim Converter Online Tool

Online tool to convert HTML or ERB to Slim template
HTML / ERB content.
Slim content.

About Slim

Slim is a Ruby template language whose goal is reduce the syntax to the essential parts. Syntax similar with Python, but for HTML.

Example code:

doctype html
  title Slim Examples
  meta name="keywords" content="template language"
  meta name="author" content=author
    alert('Slim supports embedded javascript!')

  h1 Markup examples

    p This example shows you what a basic Slim file looks like.

    == yield

    - unless items.empty?
        - items.each do |item|
            td.price = item.price
    - else
       | No items found.  Please add some inventory.
         Thank you!

  div id="footer"
    = render 'footer'
    | Copyright © #{year} #{author}

About ERB

ERB is an implementation of eRuby written purely in the Ruby programming language and included in the Ruby standard library.

An ERB template can be generated by running a piece of code written using the ERB object. A simple example is as shown below.

require 'erb'
x = 400
simple_template = "Value of x is: is <%= x %>."
renderer =
puts output = renderer.result(binding)