as of now (nbconvert version 5.6.0) the easiest solution seems to be to provide the argument --no-input when using the CLI interface of nbconvert:

jupyter nbconvert yourNotebook.ipynb --no-input

it works like magic more info here

Answer from vincentVega on Stack Overflow
🌐
nbconvert
nbconvert.readthedocs.io › en › latest › usage.html
Using as a command line tool — nbconvert 7.17.1 documentation
Simplified HTML, using the classic jupyter look and feel. ... Base HTML, rendering with minimal structure and styles. ... If this option is provided, embed images as base64 urls in the resulting HTML file. ... Latex export. This generates NOTEBOOK_NAME.tex file, ready for export.
Discussions

python - export notebook to pdf without code - Stack Overflow
I have a large notebook with a lot of figures and text. I want to convert it to a html file. However, I don't want to export the code. I am using the following command ipython nbconvert --to html More on stackoverflow.com
🌐 stackoverflow.com
python - How export a Jupyter notebook to HTML from the command line? - Stack Overflow
I want to run jupyter notebook via terminal and generate html page to show it to user without showing the editable scripts to user. Can I do that? Or suggest the better way to show visualized test results. ... nbconvert can execute a notebook and convert it to HTML (or other formats). To hide code, ... More on stackoverflow.com
🌐 stackoverflow.com
Programmatically Export to HTML from Within Notebook With Custom Output Path
I have a use case in which I have a notebook intended for use by non-programmers. All they have to do is make sure all of the cells run. I’d like to get the last cell to write an HTML copy of the notebook to disk without the user needing to modify anything in the cell. More on discourse.jupyter.org
🌐 discourse.jupyter.org
3
0
February 26, 2022
pandas - Generate pdf from jupyter notebook without code - Data Science Stack Exchange
I have a Jupyter notebook that contains markdown, code, and outputs (graphs). I would like to generate PDF from this notebook. I tried to hide code using HTML code which I get from here then I tried to download it as pdf but again code shows up. But when I download it as HTML it don't show any code but again when I tried to convert ... More on datascience.stackexchange.com
🌐 datascience.stackexchange.com
July 8, 2020
🌐
Runcell
runcell.dev › tool › ipynb-to-html
Jupyter Notebook to HTML Converter
This IPYNB to HTML converter operates entirely client-side in your web browser. No Jupyter installation, Python environment, or server dependencies are needed. The converter parses your IPYNB file's JSON structure directly in JavaScript, maintaining all code cells, markdown formatting, and execution outputs. This makes it perfect for quick conversions when you're on a machine without a Python environment or when you need to share notebooks with non-technical team members.
🌐
MLJAR
mljar.com › blog › jupyter-notebook-html
The 3 ways to export Jupyter Notebook to HTML
July 27, 2022 - The convertion of the notebook ipynb file to html can be done with one command: ... The above command will create HTML file with name my-notebook.html. The big advantage of nbconvert over GUI apporach for downloading Jupyter Notebook as HTML is that we can easily select what parts of the notebook will be exported. For example, we can easily export only outputs of cell execution, so we will share in HTML only results (code will be not present in the HTML).
🌐
GitHub
github.com › jupyter › nbconvert
GitHub - jupyter/nbconvert: Jupyter Notebook Conversion · GitHub
This command creates an HTML output file named mynotebook.html. Check if pandoc is installed (pandoc --version); if needed, install: ... Community Technical Support and Discussion - Discourse: A place for installation, configuration, and troubleshooting assistannce by the Jupyter community. As a non-profit project and maintainers who are primarily volunteers, we encourage you to ask questions and share your knowledge on Discourse. ... The Jupyter Development Team is the set of all contributors to the Jupyter project.
Starred by 1.9K users
Forked by 608 users
Languages   Python 51.5% | Jupyter Notebook 37.9% | Jinja 10.3% | CSS 0.2% | Makefile 0.1% | Go Template 0.0%
🌐
YouTube
youtube.com › watch
How to Convert Jupyter Notebook to HTML Easily (2024) - YouTube
In this video, I'll show you how you can convert Jupyter Notebook to HTML easily. Jupyter Notebook is a very popular web based too that allows you to create ...
Published   May 15, 2024
🌐
GitHub
gist.github.com › nile649 › 332104dddfdcc16be85a8b6caaa584f0
Convert IPYNB to HTML without code blocks. · GitHub
jupyter nbconvert --to html --template hidecode.tpl default.ipynb · save following lines in hidecode.tpl · {%- extends 'full.tpl' -%} {% block input_group %} {%- if cell.metadata.get('nbconvert', {}).get('show_code', False) -%} ((( super() ...
Find elsewhere
Top answer
1 of 6
89

I found this article interesting it explains how to remove the input columns :

you have to create a template file named "hidecode.tplx" in same directory as the notebook you want to convert and add those line in it :

    ((*- extends 'article.tplx' -*))

((* block input_group *))
    ((*- if cell.metadata.get('nbconvert', {}).get('show_code', False) -*))
        ((( super() )))
    ((*- endif -*))
((* endblock input_group *))

And after run this command it will use pdfLatex to convert the notebook in pdf via latex:

jupyter nbconvert --to pdf --template hidecode Example.ipynb

or if you want to edit you can convert it to a .tex document and use pdfLatex to put it in pdf :

jupyter nbconvert --to latex --template hidecode Example.ipynb

EDIT Sept 2018:

ipython nbconvert is deprecated. It will be replaced by jupyter nbconvert: So we replace the command ipython with jupyter

EDIT Feb 2021: (This is my best answer here, so let me take care of it)

Following @Mrule comment adding --no-input flag will make it work without the template...

jupyter nbconvert --to latex --no-input Example.ipynb 

PS: If you are getting issue saying :

LaTeX error related to tcolorbox.sty not found

Please refer to this guide to update your tex installation and this question

2 of 6
46

I was seeking the same question in SO and finally turned out to a very straightforward way:

Assuming using Firefox(57) + Win7

  1. Run Jupyter notebook and download the notebook in the browser: File->Download as->HTML and you will get a html page with code and output.
  2. Open the exported HTML with browser and activate the browser console with key F12
  3. Run following command in the console:

    document.querySelectorAll("div.input").forEach(function(a){a.remove()})
    
  4. The code removes all input div DOM. Then right mouse button and chose "Save Page As" and Save the "Complete page" (not single page).

  5. You will get a page with an associated folder in windows. Use a trick by zip the html page and then extract to unbind the associated. The folder is useless.

  6. Now it is a single html page without code. You can re-distribute it or print it as PDF.

If you are not using Firefox or Windows, please adjust the above 3-6 steps.

🌐
nbconvert
nbconvert.readthedocs.io
nbconvert: Convert Notebooks to other formats — nbconvert 7.17.1 documentation
Primarily, the nbconvert tool allows you to convert a Jupyter .ipynb notebook document file into another static format including HTML, LaTeX, PDF, Markdown, reStructuredText, and more.
🌐
Jupyter Community Forum
discourse.jupyter.org › jupyterlab
Programmatically Export to HTML from Within Notebook With Custom Output Path - JupyterLab - Jupyter Community Forum
February 26, 2022 - I have a use case in which I have a notebook intended for use by non-programmers. All they have to do is make sure all of the cells run. I’d like to get the last cell to write an HTML copy of the notebook to disk without…
🌐
Vertopal
vertopal.com › en › convert › ipynb-to-html
Online IPYNB (Jupyter Notebook) to HTML Converter - Vertopal
Several browser-based converters ... for quick sharing or embedding in web platforms. Use Vertopal CLI to process IPYNB (Jupyter Notebook) document and export as HTML document....
🌐
University of Illinois at Urbana-Champaign
courses.physics.illinois.edu › phys213 › fa2020 › html-embed-export-tutorial.pdf pdf
Exporting a Jupyter Notebook to HTML with Embedded Images
Find the last cell in your notebook and click in the margin to the left of it. This selects the cell without · selecting the text in it. Then, press the "b" key. This creates a new cell below. Make sure the type of the new cell is set to "Code" in the toolbar (not "Markdown"), and then enter ...
🌐
JupyterLab Documentation
jupyterlab.readthedocs.io › en › 4.4.x › user › export.html
Exporting Notebooks — JupyterLab 4.4.10 documentation
After completing these steps, browse the file menu and export as described in the exporting notebooks section. A .html file that you will be prompted to download.
🌐
GitHub
github.com › jupyterlab › jupyterlab › issues › 10896
Hide the code in the exported html · Issue #10896 · jupyterlab/jupyterlab
August 23, 2021 - Dear all, is there any possibility of exporting a notebook to html, hiding its code? Another option would be to be able to hide the code in the exported html, is it possible? Kind regards
Author   akitxu
🌐
Stack Overflow
stackoverflow.com › questions › 49089091 › convert-jupyter-notebook-to-html-without-css
nbconvert - Convert jupyter notebook to html without css - Stack Overflow
March 4, 2018 - Wow, I've never looked at one of those converted files! There are some interesting design decisions there. They include the entire bootstrap library non-minified, yet reference jquery on a cdn... ... I can't seem to find a clean way to do this. You'll probably have to manually edit the generated file and drop in your own css - or script that edit. Note there is some chatter about changing to a CDN here: github.com/jupyter/nbconvert/issues/752
🌐
GitHub
github.com › jirutka › ipynb2html
GitHub - jirutka/ipynb2html: Convert Jupyter (IPython) Notebooks to static HTML · GitHub
This package provides the converter itself and some utilities with no dependencies. You have to provide your own syntax highlighter and Markdown, math and ANSI sequences renderer; or not, if you don’t need them. This package builds on the ipynb2html-core and provides a complete, ready-to-go renderer configured with: ... It also provides a reference stylesheet which you can find in dist/notebook.min.css (or non-minified styles/notebook.css).
Starred by 36 users
Forked by 3 users
Languages   TypeScript 77.3% | JavaScript 19.6% | CSS 2.5% | Shell 0.6%
🌐
Julia Programming Language
discourse.julialang.org › tooling › vs code
VSCode... export Jupyter Notebook as HTML - VS Code - Julia Programming Language
March 5, 2024 - In the past, I could export Jupyter Notebooks as HTML in the following way: Click on the dots at the RHS of the notebook menu Choose Export Choose …as HTML This opened the file browser, and one could choose file name.