About this tool
Convert HTML to VB.NET ASP.NET templates and convert VB.NET markup back to clean HTML placeholders.
The HTML VB.NET Converter moves markup between plain HTML and ASP.NET Web Forms with VB: HTML to VB.NET rewrites every {{ placeholder }} as <%= Server.HtmlEncode(name) %>, adds a <%@ Page Language="VB" AutoEventWireup="false" %> directive and a <script runat="server"> block declaring each value as Protected name As String, and prefixes root-relative src/href/action paths with <%= basePath %>. VB.NET to HTML runs the same mapping backwards, stripping directives and server blocks, decoding Response.Write string literals, and turning encoded expressions back into {{ }} placeholders. It is for developers maintaining .aspx pages who want to edit the markup as ordinary HTML.
Open HTML VB.NET Converter on AltFTool — it loads instantly in your browser.
Pick a direction — HTML to VB.NET or VB.NET to HTML — then paste into the Source code box, press Upload code to load a .html, .htm, .aspx, .ascx, .vb or .txt file, or press Load sample.
Toggle the options for that direction: Page directive, Server block, Base-path assets and Safe expressions going to VB.NET; Strip server code, Expression placeholders, Logic as comments and Decode strings coming back to HTML.
Read Generated VB.NET or Generated HTML in the output pane, then press Copy, or Download to save converted.aspx or converted.html; Swap feeds the output back in as the new input.
Placeholders become Server.HtmlEncode(...) rather than a raw <%= name %>, so injected values cannot break out of the markup.
Declared defaults escape a double quote as two double quotes, which is VB's rule, and Response.Write literals are decoded the same way on the return trip.
Non-expression <% ... %> blocks such as If/End If come back as <!-- VB.NET logic removed: ... --> and are counted in the warnings instead of vanishing.
It opens with <%@ Page Language="VB" AutoEventWireup="false" %>, followed by a <script runat="server"> block holding one Protected name As String = "..." line per placeholder, then your markup with <%= Server.HtmlEncode(name) %> in place of each {{ }}. Both the directive and the server block are optional toggles.
Three forms: <%= Server.HtmlEncode(x) %>, <%= HttpUtility.HtmlEncode(x) %> and the bare <%= x %>. Each becomes {{ x }}, with underscores mapped back to dots so user_name reads as {{ user.name }}. References to basePath are removed rather than turned into placeholders, since they only existed to prefix paths.
Because they began with a single / , which only resolves correctly when the app sits at the domain root. Only src, href and action values starting with / are rewritten; //, https:, mailto:, tel:, data:, javascript:, # and values already containing <%= are left untouched, and basePath is declared as an empty string so nothing changes until you set it.
No. Only output expressions have an HTML equivalent. Control flow inside <% ... %> — If/Then, For Each, End If — is turned into an HTML comment recording the original code, and the number of blocks converted is reported as a warning so you can port them by hand.
Add the HTML VB.NET Converter widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/html-vbnet-converter"
title="HTML VB.NET Converter — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/html-vbnet-converter?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>