# View Current Page Source | Shortcuts Library

> View the live HTML source of any web page, directly from the share sheet

## What this shortcut does

This shortcut displays the current state of a web page's HTML source with syntax highlighting. It must be run from the share sheet of Safari. The source shown reflects the current DOM, including any changes made by JavaScript.
Version 1.0 functioned reliably from iOS 13 through 18.3.2. However, iOS 18.4 introduced a bug (FB17129679) that delays script execution by over 10 seconds.
Version 2.0
works around this issue and introduces several improvements.
Version 2.1
added Prism's "Show Invisibles" plugin, which makes spaces, tabs and line breaks visible. It also makes the "Line Numbers" and "Show Invisibles" plugins optional.
Version 2.2
supports pages without explicit doctypes, and the performance is improved, including disabling "Show Invisibles" automatically if the page is too large.
Features
Syntax highlighting powered by Prism
No network requests — uses the page already loaded in Safari
Supports light and dark mode
Displays line numbers
Converts absolute URLs into clickable links
Includes a workaround for the iOS 18.4 execution delay bug (FB17129679)
First published in Reddit in November 2018 (iOS 13!)
Thanks to users @demon2758 (r/shortcuts' Discord) and
@gluebyte
for finding the bug and the workaround, as well as doing research on it.

## Compatibility

iPhone, iPad

## Required apps



[View this page](https://shortcutlibrary.app/shortcuts/view-current-page-source)

[Download Shortcuts Library on the App Store](https://apps.apple.com/app/id6759494377)
