How to Easily Convert your Sketch Designs to HTML using this AI Tool

How to Easily Convert your Sketch Designs to HTML using this AI Tool
August 13, 2021

When it comes to designing or redesigning a website or digital product, there are often multiple stages. With each stage, design versions get thrown out and the execution is refined as you go - sketch, wireframe, prototype, code.

These stages can be an obstacle for designers who are not fluent in code and have a lack of resources to complete all parts of their project. Luckily the Microsoft sketch2code AI tool is here to help get over that hurdle!

What is sketch design?

When you draw sketches directly in regards to web design, it's usually because you are trying to quickly develop a prototype website before investing more time and resources into development. Basically, it is something that web developers use as a cheaper way to make changes as per the client's requirement.

Microsoft sketch2code

If you are the kind of designer who likes to use a pencil and paper for your projects, but you don't want to miss out out on all the great features that technology brings, then Microsoft Sketch2Code is the best tool for you.

Sketch2code is a super cool development tool that is created by Microsoft. It helps design and test prototypes. Instead of learning to code, you can just design in Sketch and export it to code.

How Does it Work?

They have trained the model to recognize hand-drawn elements like a textbox or button present in web design. They use the text recognition feature from the Computer Vision Service to extract hand-written text. By combining design elements and edited content, we can create HTML snippets that represent the relevant parts of your website. We can also infer the size and its position on the page for certain elements.

Here is the Sketch2code architecture diagram:


Converting Your Sketch to HTML

To convert your sketch 2 HTML code, Follow the following steps:

  1. Go to https://sketch2code.azurewebsites.net/
  2. Click on the upload your own button if you have an image file of the sketch
  3. If you do not have an image file, you can take a photo of your sketch drawn on paper.
  4. After uploading your Sketch Microsoft Sketch2Code will convert it to HTML
  5. Then you can download the HTML code of your sketch

Here is the sample of HTML code that is generated by this AI tool:

<!DOCTYPE html>
<html lang="en"><head><meta name="viewport" content="width=device-width" /><title>HTML Result</title><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"></head><body><div class="container body-content"><div class="container"><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><input class="form-control"></input></div><div class="col" style="padding-top:10px;"><button class="btn btn-primary">SEARCH</button></div></div><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><img alt="Image html" width="90%" height="90%" style="max-height:500px;max-width:500px;"src="https://sketch2code.azurewebsites.net/Content/img/fake_img.svg" /></div><div class="col" style="padding-top:10px;"><img alt="Image html" width="90%" height="90%" style="max-height:500px;max-width:500px;"src="https://sketch2code.azurewebsites.net/Content/img/fake_img.svg" /></div><div class="col" style="padding-top:10px;"><img alt="Image html" width="90%" height="90%" style="max-height:500px;max-width:500px;"src="https://sketch2code.azurewebsites.net/Content/img/fake_img.svg" /></div></div><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><label>PRODUCT 1</label></div><div class="col" style="padding-top:10px;"><label>PRODUCT 2</label></div><div class="col" style="padding-top:10px;"><label>PRODUCT 3</label></div></div><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><p class="text-black-50">
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit
                            <br />
                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                            <br />
                            Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                        </p></div><div class="col" style="padding-top:10px;"><label></label></div></div><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><label>$ 20.15</label></div><div class="col" style="padding-top:10px;"><label>$ 19.50</label></div><div class="col" style="padding-top:10px;"><label>$ 35.80</label></div></div><div class="row justify-content-start" style="padding-top:10px;"><div class="col" style="padding-top:10px;"><button class="btn btn-primary">ADD TO CART</button></div><div class="col" style="padding-top:10px;"><button class="btn btn-primary">ADD TO CART</button></div><div class="col" style="padding-top:10px;"><button class="btn btn-primary">ADD TO CART</button></div></div></div></div></body>
</html>

We hope you enjoy our article! Please subscribe to our newsletter to stay updated in the software development industry to grow your career and stay ahead of the competition.


Resources for You

ChatGPT Guide For Software Developers

Learn to use ChatGPT to stay ahead of competition

Front-End Developer Interview Kit

Today, Start preparing to get your dream job!

JavaScript Developer Kit

Start your JavaScript journey today!

Master JavaScript by Solving Daily Challenges

Challenge Yourself Daily: Advance Your JavaScript Skills and Career

View Challenges

Newsletter for Developers!

Join our newsletter to get important Web Development and Technology Updates