View Page Source

可直接粘贴源码美化;也可从 URL 拉取——默认服务端代理由本站服务器抓取(绕过 CORS),浏览器直连受 CORS 限制。出于安全考虑,代理默认不允许访问内网/保留地址。

What Is a View Source Tool?

A view source tool is an online HTML source viewer and formatter that fetches web pages by URL or accepts pasted source code, letting you quickly inspect page structure and analyze how a page is built for front-end development and debugging. It supports both server-side proxy and direct browser fetch, with the server-side proxy used by default to bypass CORS restrictions.

Main Features

  • Fetch HTML source from a URL; the server-side proxy bypasses browser CORS restrictions
  • Direct browser fetch mode for sites that allow CORS
  • HTML formatting powered by js-beautify with automatic indentation for better readability
  • Paste source for local formatting, one-click copy, and a built-in demo

Use Cases / Notes

Ideal for studying page structure, analyzing source code, and quickly formatting third-party HTML. For security reasons, the server-side proxy blocks internal and reserved addresses by default; if the target site forbids fetching or blocks CORS, switch fetch mode or paste the source directly.

How to Use

  1. Enter a page URL or paste HTML source
  2. Choose "Server-side proxy" or "Direct browser" as the fetch mode, then click Fetch or Beautify
  3. Review the formatted source in the result area and copy it with one click if needed