I made an HTML/DOM viewer you can paste into your console to view or debug any website in 3D. Choose from random/gradient/clear colors or whether layers have sides.

You can save it as a bookmarklet so it's 1 click away. It's just a tiny IIFE JS function.
https://gist.github.com/OrionReed/4c3778ebc2b5026d2354359ca49077ca

3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.

3D DOM viewer, copy-paste this into your console to visualise the DOM topographically. - dom3d.js

Gist
Complex websites are the funnest to look at, here's Twitter for example. Rendering the sides works fastest in Safari, oddly, but performance-wise Chrome and Firefox are a lot better for large websites.
You can use this view to programmatically pull out features, for example here are the โ€œcardsโ€ of a Google search result, you can see how some of them are not like the others.
With sides enabled, you can see the skyline of your DOM.
Here's my website, almost flat by comparison. You can count the layers on one hand.
@orion 'the skyline of your DOM' has to be to best sentence I've read on webdev for years.
@orion Now that's a neat way to visualise DOM depth!

@orion Twitter's not truly complex, it's just stupid :D

I do vaguely remember there being some kind of devtools plugin for one of the major browsers, allowing such a 3d view... like a decade ago, and unfortunately it didn't live for too long.

I think it's a great tool if the UX can be done right... and I really wish the web stopped being as stupid as it currently is (see indeed: twitter as html source code)

@ralesk @orion I do also remember that tool, but cannot remember the name. It had it's uses and it's good to see someone has revived the idea!

As requested, I've made a browser extension. A little development help would be *massive* โ€” currently only works in Firefox so Chrome/Safari help would be great.

Once it's polished, I'll make it freely available in extension stores for easy usage.

https://github.com/OrionReed/dom3d

GitHub - OrionReed/dom3d: Browser extension to view and debug the DOM in 3D space.

Browser extension to view and debug the DOM in 3D space. - OrionReed/dom3d

GitHub

@orion Firefox used to have this natively and Iโ€™ve been missing it.

Thanks @orion

@orion this is so cool. Thank you for sharing it!
@orion
Extensions usually work in both, Firefox and Chromium. There are some incompatibilities, but for them you can use a polyfill.
@orion This is awesome! Iโ€™ve kept Edge around especially for this function but this serves the purpose just fine. Bravo!

@orion oooh, I remember this from Firefox from many many years ago! Fancy!

https://firefox-source-docs.mozilla.org/devtools-user/3d_view/index.html

3D view โ€” Firefox Source Docs documentation

@orion They removed it in 2016 with Firefox 47.
@orion foobar2000 ๐Ÿ™Œ๐ŸŽถ
@orion Ooh nice! This reminds me of Mozilla Tilt (but prettier) from several years ago! I had made a Tumblr about it at the time https://webscenery.tumblr.com
Web Sceneries

Web landscape photography with Mozilla Tilt.

Tumblr
@nclm @orion same thoughts!! Too bad they removed it because doing it in a multi process model (similar to Chrome) was either too difficult or non performant.
@orion holy sh*t that's awesome
@orion Finally, someone brought back the old firefox 3d debug feature ( https://firefox-source-docs.mozilla.org/devtools-user/3d_view/index.html ).
3D view โ€” Firefox Source Docs documentation

@ilikecats @orion came here to say that! I loved that feature!
@orion very cool. Like the native view inspector / exploder in xcode
@orion @b0rk Yesssss, thank you! Firefoxโ€™s web inspector used to have a feature like this and I always found it surprisingly useful for untangling positioning issues and I was sad when it went away.
@orion somehow in Firefox on macOS pages end up upside down. Still very cool!

@orion that's brilliant!

CC @Meyerweb we were chatting about this sort of thing last year, I think.

@orion totally gonna make this a VisBug plugin so folks can invoke it via the extension ๐Ÿค˜๐Ÿป
@orion @[email protected] I appreciate seeing foobar2000 as a random example (although you only searched for โ€œfoobarโ€, of course). I miss that player โ€ฆ
@orion This reminds me about the Katamari bookmarklet, great stuff!
@orion "I know this, it's a UNIX system!"

@orion change COLOR_SURFACE to false and this will make an excellent April Fools Day prank if you have access to a friend/coworker/relative's computer. (It looks normal until you move your mouse over the site, then all hell breaks loose.)

I've translated this to a one-liner that's easily visited on another computer. Just go to https://tinyurl.com/dom3djs and put its contents in the clipboard. Then hit F12 or Ctrl+Shift+i from another website paste, and close the console and github gist. Make sure you don't mouse over the target site.

@orion I was sad to see the 3D debugger be removed from Firefox but I love this reincarnation and how elegant it is!
@orion You know what would be really cool and helpful for web devs? Adding something like ctrl-scroll to hide the top layers, so you can see through to various parts.
@north This is a great idea!
@orion โ€ždebug in 3dโ€œ  
this seems like something @val would enjoy
@ellisdex sorry i only just saw this!! and omg it's so rad thank you for linking

@orion

Definitely does not help with debugging, but I like it. ๐Ÿ™‚

@orion how did we survive without this? ๐Ÿ˜ Massive!
@orion This is awesome. I remember Firefox having this feature, or that it was some plugin. It's really cool to see websites that way. Some of them are scary, and the forms are usually messed up.
@orion I'm being a bit slow, I'm sure. It's for the developer console in the browser, correct?
@orion Nice, this isn't an Edge feature exclusively from now on... ๐Ÿ˜น
@orion Pepperridge farms remember when it was just an option in firefox dev tools.

Watts the safeword is such a good channel. They just released a video about bottoming. My! I wish that was part of my sexuality classes at school at the time.

https://www.youtube.com/watch?v=ICcUoXJTgis

@orion It reminds me of the time when this existed in Firefox, I liked using this 3D preview of the HTML DOM. nice!
@orion oh this is absolutely not a fan of WebXP ahah
DevTools Tips

See the page in 3D

DevTools Tips
@orion oh that's smart ๐Ÿ˜ถ
@orion wow virtual reality is so cool you can feel the foobar
@orion holy shit I had no idea CSS could just do 3D stuff like this without like, a WebGL context! Seriously impressive!

@orion This is amazing! Firefox's old 3D view was one of the first things that really hooked me on web dev, and I'm so glad to see something that brings that back.

https://firefox-source-docs.mozilla.org/devtools-user/3d_view/index.html

3D view โ€” Firefox Source Docs documentation