Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

HTMLtoText ( text ; returns )

Rate this function:  

  Average rating: 3.8  (60 votes)
  Discuss this Custom Function

Mogens Brun, FM Integrator

Convert HTML text to text preserving bold and italic styles (v. 1.04).

Sample Input:
HTMLtoText ( "</h2>
<h2>Product Description:</h2>
Over 50 Conversions Very Quick<br /> Copy With click of 1 button<h2>What's new in this version:</h2>" ; "single" )
Sample Output:
<h2>Product Description:</h2>Over 50 Conversions Very Quick
Copy With click of 1 button<h2>What's new in this version:</h2>

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed


Together with two subordinate custom functions "HTMLtoText_deleteTags" and "HTMLtoText_convertStyle" (also found on this site) this function will parseHTML text to plain text with preservation of any italic or bold markup in the HTML text. Several pages of text may be converted with reasonable text formating. The HTML text could be imported in a field by Troi URL plug-in, Fusion TCPdirect plug-in or by FileMaker GetLayoutObjectAttribute ( "WebViewerName" ; "content" ).

The second parameter (returns) controls if no empty lines should be allowed ( returns = "single") or one empty line may be allowed between paragraphs (returns = "double") with "double" as default.

Note: Requires FileMaker 10 or higher - unless 3 special char-values are stored in global fields.

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 10 comments


i would like to have to output of the field into DB readable format like

"field1-1.row", "field2-1.row", "field3-1.row"
"field1-2.row", "field2-2.row", "field3-2.row"

any ideas?

Peter, Internet
June 10, 2014 5:00am

I've copied and pasted all three functions so I think they're accurate but the function is converting both <i> and <b> tags to bold.

I'm seriously impressed with the rest, though!

Any ideas what I might have done wrong?


Alastair, Edinburgh
February 10, 2015 7:44am

I answered my own question by adding a parameter, StyleToAdd to the HTMLtoText_convertStyle function and then using the parameter instead of 'Bold' in the second bottom line.

Then I added either 'Bold' or 'Italic' (without apostrophes) to the relevant lines of this function.

Thanks again.

Alastair, Edinburgh
February 10, 2015 7:54am

Very helpful custom function - have been using it for a few years. Getting one unexpected result; any ideas?

This HTML:

From: <b class="gmail_sendername">John Doe</b> <span dir="ltr">&lt;<a href=""></a>&gt;

Displays in a browser as:
From: John Doe <>

But the custom function seems to delete the space and the less than symbol that proceeds the email address giving this result:

From: John>

Holly Headhunter, Nashville TN
September 23, 2016 7:35am

Really really marvelous. Thanks a lot !!! I added some special characters like "&mdash" or &rsquo; for example, that are not converted. Very nice result.

Tigrou83, France
August 27, 2017 6:24am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 4 + 3 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. PreviousMonthEndDate ( myDate )
  (Wed, Mar 07, 3:35am)
2. PreviousMonthName (myDate)
  (Wed, Mar 07, 3:33am)
3. FmTableFields ( tableName ; fieldsInclude ; fieldsExclude ; classExclude ; typeExclude ; prefixExclude )
  (Fri, Mar 02, 6:32am)
4. sql.getTable ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:36am)
5. sql.getField ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:34am)
6. FilterOut ( ListA ; ListB )
  (Wed, Feb 21, 6:11pm)
7. Char0 ( )
  (Sun, Feb 18, 2:35am)
8. CreateVCardFile ( FirstName ; LastName ; CompanyName ; Phone ; Email ; WEB ; hAddress1 ; hAddress2 ; hZip ; hCity ; hCountry ; wAddress1 ; wAddress2 ; wZip ; wCity%2
  (Sun, Feb 18, 1:50am)

RSS Feed of Custom Functions